/* Dysk Manager - Styles */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header h1 { 
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.header .logo-icon {
    width: 28px;
    height: 28px;
}
.header .user-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
}
.header-actions { display: flex; gap: 15px; align-items: center; }
.header a { color: white; text-decoration: none; opacity: 0.9; }
.header a:hover { opacity: 1; }

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Toolbar */
.toolbar {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.toolbar input[type="text"] {
    padding: 10px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 14px;
}
.toolbar input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn svg {
    width: 16px;
    height: 16px;
}
.btn-primary {
    background: #667eea;
    color: white;
}
.btn-primary:hover { background: #5a6fd6; }
.btn-secondary {
    background: #e9ecef;
    color: #495057;
}
.btn-secondary:hover { background: #dee2e6; }

/* Icon buttons (actions) */
.btn-icon {
    padding: 8px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid #dee2e6;
    color: #6c757d;
}
.btn-icon:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}
.btn-icon.btn-share {
    color: #667eea;
    border-color: #667eea;
}
.btn-icon.btn-share:hover {
    background: #667eea;
    color: white;
}
.btn-icon.btn-unshare {
    color: #fd7e14;
    border-color: #fd7e14;
}
.btn-icon.btn-unshare:hover {
    background: #fd7e14;
    color: white;
}
.btn-icon.btn-delete {
    color: #dc3545;
    border-color: #dc3545;
}
.btn-icon.btn-delete:hover {
    background: #dc3545;
    color: white;
}
.btn-icon.btn-copy {
    color: #6c757d;
    border-color: #6c757d;
}
.btn-icon.btn-copy:hover {
    background: #6c757d;
    color: white;
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb a svg {
    width: 16px;
    height: 16px;
}
.breadcrumb-sep { color: #999; }
.breadcrumb-home span { margin-left: 2px; }

/* File list */
.file-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.file-item {
    display: grid;
    grid-template-columns: 1fr 100px 150px 200px;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    transition: background 0.2s;
}
.file-item:hover { background: #f9f9f9; }
.file-item:last-child { border-bottom: none; }
.file-header {
    background: #f5f7fa;
    font-weight: 600;
    color: #666;
    font-size: 13px;
}
.file-header:hover { background: #f5f7fa; }

.file-name {
    display: flex;
    align-items: center;
    gap: 12px;
}
.file-name a {
    color: #333;
    text-decoration: none;
}
.file-name a:hover { color: #667eea; }
.file-icon {
    display: flex;
    align-items: center;
    color: #6c757d;
}
.file-icon svg {
    width: 20px;
    height: 20px;
}
.is-dir .file-icon { color: #667eea; }
.file-size { color: #888; font-size: 13px; }
.file-date { color: #888; font-size: 13px; }
.file-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: #888;
}
.empty-state svg {
    width: 24px;
    height: 24px;
    opacity: 0.5;
}

/* Upload zone */
.upload-zone {
    border: 3px dashed #ddd;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s;
    cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: #667eea;
    background: #f0f3ff;
}
.upload-zone input { display: none; }
.upload-zone .icon { margin-bottom: 10px; color: #aaa; }
.upload-zone .icon svg { width: 48px; height: 48px; }
.upload-zone p { color: #666; }

.upload-progress {
    margin-top: 15px;
}
.upload-item {
    background: #f5f7fa;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.upload-item .name { flex: 1; font-size: 14px; }
.progress-bar {
    width: 150px;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar .fill {
    height: 100%;
    background: #667eea;
    width: 0;
    transition: width 0.3s;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
}
.modal h2 { margin-bottom: 20px; }
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.share-url {
    background: #f5f7fa;
    padding: 15px;
    border-radius: 8px;
    word-break: break-all;
    font-family: monospace;
    margin: 15px 0;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}
.tab {
    padding: 10px 20px;
    background: #e1e1e1;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tab svg {
    width: 16px;
    height: 16px;
}
.tab.active {
    background: white;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

.shared-badge {
    background: #27ae60;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 10px;
}

.created-by {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    color: #adb5bd;
    cursor: help;
}
.created-by svg {
    width: 14px;
    height: 14px;
}
.created-by:hover {
    color: #667eea;
}

/* Login page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}
.login-box h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.login-box h1 svg {
    width: 28px;
    height: 28px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}
.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}
.form-group input:focus {
    outline: none;
    border-color: #667eea;
}
.login-box button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.login-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}
.error {
    background: #fee;
    color: #c00;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .file-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .file-header { display: none; }
    .file-actions { justify-content: flex-start; }
    .toolbar { flex-direction: column; }
}
