:root {
    --bg-color: #0d1117;
    --panel-bg: rgba(22, 27, 34, 0.6);
    --panel-border: rgba(255, 255, 255, 0.1);
    --primary: #58a6ff;
    --primary-hover: #3182ce;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --danger: #f85149;
    --danger-bg: rgba(248, 81, 73, 0.1);
    --success: #2ea043;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(137, 87, 229, 0.08) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Login */
.login-body {
    justify-content: center;
    align-items: center;
}

.login-panel {
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: fadeIn 0.6s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    color: var(--primary);
}

.logo h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin: 0;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    transition: 0.3s;
    pointer-events: none;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    background: var(--bg-color);
    padding: 0 8px;
    color: var(--primary);
    border-radius: 4px;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.3);
}

.error-msg {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    border: 1px solid rgba(248, 81, 73, 0.2);
    margin-bottom: -10px;
}

/* Dashboard */
.dashboard-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
}

.sidebar {
    width: 280px;
    height: 100%;
    border-right: 1px solid var(--panel-border);
    border-radius: 0;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

.sidebar nav {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sidebar nav a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar nav a:hover, .sidebar nav a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar nav a.active {
    background: rgba(88, 166, 255, 0.1);
    color: var(--primary);
}

.user-info {
    padding-top: 24px;
    border-top: 1px solid var(--panel-border);
    font-size: 14px;
    color: var(--text-secondary);
}

.user-info b {
    color: var(--text-primary);
}

.main-content {
    flex: 1;
    padding: 40px 60px;
    overflow-y: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.drop-zone {
    border: 2px dashed rgba(88, 166, 255, 0.4);
    border-radius: 20px;
    padding: 60px;
    text-align: center;
    margin-bottom: 40px;
    background: rgba(88, 166, 255, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone.highlight, .drop-zone:hover {
    border-color: var(--primary);
    background: rgba(88, 166, 255, 0.08);
}

.drop-zone p {
    color: var(--text-secondary);
    margin-top: 16px;
    font-size: 16px;
    pointer-events: none;
}

.upload-progress {
    display: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 24px;
    overflow: hidden;
}

.progress-bar {
    width: 50%;
    height: 100%;
    background: var(--primary);
    animation: indeterminate 1.5s infinite linear;
    transform-origin: 0% 50%;
}

@keyframes indeterminate {
    0% { transform: translateX(-100%) scaleX(0.2); }
    40% { transform: translateX(0) scaleX(0.5); }
    100% { transform: translateX(200%) scaleX(0.2); }
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.file-card {
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(88, 166, 255, 0.3);
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(88, 166, 255, 0.1);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-info h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.file-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-icon.text-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
    border: 1px dashed var(--panel-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        padding: 20px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--panel-border);
    }
    .sidebar nav {
        margin-top: 0;
        flex-direction: row;
    }
    .sidebar nav a span {
        display: none;
    }
    .user-info {
        display: none;
    }
    .main-content {
        padding: 24px;
    }
    header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    .btn-primary {
        width: 100%;
    }
    .files-grid {
        grid-template-columns: 1fr;
    }
}
