
/* Modern File Upload System - Spotify-inspired design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Spotify-inspired color palette */
    --bg-base: #1E1E24;
    --bg-elevated-base: #2A2A31;
    --bg-elevated-highlight: #33333D;
    --bg-tinted-base: #0d1117;
    --text-base: #ffffff;
    --text-subdued: #a7a7a7;
    --text-bright-accent: #825EDB;
    --essential-base: #000000;
    --essential-subdued: #181818;
    --essential-bright-accent: #825EDB;
    --decorative-base: #292929;
    --surface-elevation-1: rgba(255,255,255,0.03);
    --surface-elevation-2: rgba(255,255,255,0.07);
    --surface-elevation-3: rgba(255,255,255,0.11);
    --danger-base: #e22134;
    --warning-base: #ffa500;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-base);
    color: var(--text-base);
    min-height: 100vh;
    line-height: 1;
    overflow-x: hidden;
}

.footer {
    text-align: center;
    padding: 20px;
    width: 100%;
    font-size: 0.85rem;
    color: #9A5DFF;
    border-top: 1px solid var(--decorative-base);
    margin-top: 40px;

}
.footer h4 {
    margin: 0;
    font-weight: 300;
}
header {
    background: var(--bg-base);
    padding: 12px 24px;
    border-bottom: 1px solid var(--decorative-base);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* Header inner layout: left (title) and right (nav + login) */
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.header-left h1 {
    color: var(--essential-bright-accent);
    font-size: 2rem;
    font-weight: 300;
    margin: 0;
    letter-spacing: 0.2rem;
    background: var(--essential-bright-accent);
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-nav {
    display: flex;
    gap: 8px;
}

.header-nav a {
    color: var(--text-subdued);
    text-decoration: none;
    font-weight: 300;
    padding: 2px 14px;
    transition: all 0.25s ease;
    font-size: 0.9rem;
    background: transparent;
    position: relative;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--essential-bright-accent);
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.header-nav a:hover {
    color: var(--text-base);
    background: var(--surface-elevation-1);
}
/* Sidebar subject dropdowns for notes.php */
.notes-subject-group {
    margin-bottom: 1rem;
    border-bottom: 1px solid #565656;
    padding-bottom: 0.5rem;

}
.notes-subject-toggle {
    background: var(--bg-base);
    border: none;
    width: 100%;
    text-align: left;
    font-weight: 400;
    font-size: 1rem;
    color: white;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 0px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.notes-subject-toggle:hover {
    background: #4a4444;
}
.dropdown-arrow {
    font-size: 1.1em;
    margin-left: 0.5em;
    transition: transform 0.2s;
}
.notes-sidebar-list {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.notes-sidebar-list.others {
    background: #565656;
}
.notes-sidebar-empty {
    padding: 1rem;
    color: #888;
    text-align: center;
}
.header-nav a:hover::after {
    width: calc(100% - 28px);
}

header a {
    color: #b0b0b0;
    text-decoration: none;
    font-weight: 300;
    padding: 8px 16px;
    margin: 0 10px;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}



/* User Info in Header */
.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--surface-elevation-1);
    border: 1px solid var(--decorative-base);
}

.user-name {
    color: var(--text-base);
    font-weight: 300;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.logout-btn {
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    color: var(--essential-base);
    padding: 6px 12px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 300;
    font-size: 0.8rem;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    margin: 0;
    box-shadow: 0 2px 8px rgba(154, 93, 255, 0.2);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
}

.logout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(154, 93, 255, 0.2);
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 28px;
    background: var(--bg-elevated-base);
    border: 1px solid var(--decorative-base);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: slideInUp 0.4s ease-out;
}

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

h2 {
    color: var(--text-base);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    position: relative;
}



table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
    background: var(--surface-elevation-1);
    overflow: hidden;
    border: 1px solid var(--decorative-base);
}

thead {
    background: linear-gradient(135deg, var(--essential-bright-accent) 0%, #b580ff 100%);
}

th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    color: var(--essential-base);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

tr {
    background: var(--surface-elevation-1);
    transition: all 0.2s ease;
    border-bottom: 1px solid white;
    max-height: 58px;
}

tr:hover {
    background: var(--surface-elevation-2);
    transform: translateX(4px);
}

tr:last-child {
    border-bottom: none;
}

td {
    padding: 14px 18px;
    color: var(--text-base);
    font-weight: 300;
    font-size: 0.9rem;
    border-right: 1px solid #424242;
}

/* Download Button in Tables */
.download-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--essential-bright-accent) 0%, #b580ff 100%);
    color: var(--essential-base);
    padding: 8px 14px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(154, 93, 255, 0.2);
    border: none;
    cursor: pointer;
    max-width: 10px;
    max-height: 10px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(154, 93, 255, 0.2);
}

/* Subject Badge */
.subject-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(154, 93, 255, 0.2), rgba(180, 128, 255, 0.1));
    color: var(--essential-bright-accent);
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(154, 93, 255, 0.25);
}

button, input[type="submit"] {
    background: linear-gradient(135deg, var(--essential-bright-accent) 0%, #b580ff 100%);
    color: var(--essential-base);
    border: none;
    padding: 11px 11px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
    border-radius: 22px;
}

button:hover {
    transform: translateY(-2px);
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: translateY(0);

}

input[type="file"] {
    background: var(--surface-elevation-1);
    color: var(--text-base);
    border: 1px solid var(--decorative-base);
    padding: 11px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.25s ease;
}

input[type="file"]:hover {
    border-color: var(--surface-elevation-3);
    background: var(--surface-elevation-2);
}

input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, var(--essential-bright-accent) 0%, #b580ff 100%);
    color: var(--essential-base);
    border: none;
    padding: 7px 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.25s ease;
    border-radius: 16px;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(154, 93, 255, 0.2);
}

input[type="file"]::file-selector-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
}

.alert {
    padding: 14px 18px;
    margin-bottom: 18px;
    font-weight: 300;
    border: 1px solid;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-danger {
    background: linear-gradient(135deg, rgba(226, 33, 52, 0.15), rgba(226, 33, 52, 0.05));
    color: #ff6b6b;
    border-color: rgba(226, 33, 52, 0.35);
}

.alert-success {
    background: linear-gradient(135deg, rgba(154, 93, 255, 0.15), rgba(154, 93, 255, 0.05));
    color: var(--essential-bright-accent);
    border-color: rgba(154, 93, 255, 0.35);
}

form {
    margin-top: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-base);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface-elevation-1);
    border: 1px solid var(--decorative-base);
    color: var(--text-base);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    resize: vertical;
    line-height: 1.5;
    min-height: 100px;
}

textarea:hover {
    border-color: var(--surface-elevation-3);
    background: var(--surface-elevation-2);
}

textarea:focus {
    outline: none;
    border-color: var(--essential-bright-accent);
    background: var(--surface-elevation-2);
    box-shadow: 0 0 0 3px rgba(154, 93, 255, 0.12);
    transform: translateY(-2px);
}

textarea::placeholder {
    color: var(--text-subdued);
}

/* Compact login in header */
.header-login .login-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-login .login-form input[type="text"],
.header-login .login-form input[type="password"] {
    background: var(--surface-elevation-1);
    color: var(--text-base);
    border: 1px solid var(--decorative-base);
    padding: 7px 11px;
    font-size: 0.85rem;
    width: 110px;
    outline: none;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.header-login .login-form input::placeholder {
    color: var(--text-subdued);
}

.header-login .login-form input:hover {
    border-color: var(--surface-elevation-3);
    background: var(--surface-elevation-2);
}

.header-login .login-form input:focus {
    outline: none;
    border-color: var(--essential-bright-accent);
    background: var(--surface-elevation-2);
    box-shadow: 0 0 0 2px rgba(154, 93, 255, 0.1);
}

.header-login .login-form button {
    padding: 7px 14px;
    font-size: 0.8rem;
    text-transform: none;
    border-radius: 16px;
    margin-top: 0;
}

/* Header register compact styles */
.header-register .register-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-register .register-form input[type="text"],
.header-register .register-form input[type="email"],
.header-register .register-form input[type="password"] {
    background: var(--surface-elevation-1);
    color: var(--text-base);
    border: 1px solid var(--decorative-base);
    padding: 7px 11px;
    font-size: 0.8rem;
    width: 100px;
    outline: none;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.header-register .register-form input::placeholder {
    color: var(--text-subdued);
}

.header-register .register-form input:hover {
    border-color: var(--surface-elevation-3);
    background: var(--surface-elevation-2);
}

.header-register .register-form input:focus {
    outline: none;
    border-color: var(--essential-bright-accent);
    background: var(--surface-elevation-2);
    box-shadow: 0 0 0 2px rgba(154, 93, 255, 0.1);
}

.header-register .register-form button {
    padding: 7px 14px;
    font-size: 0.8rem;
    text-transform: none;
    border-radius: 16px;
    margin-top: 0;
}

/* Responsive design */
@media (max-width: 1024px) {
    .header-inner {
        padding: 0 16px;
    }
    
    .container {
        margin: 24px 16px;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 16px;
        padding: 0 16px;
    }
    
    .header-left h1 {
        font-size: 1.25rem;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .container {
        margin: 16px;
        padding: 20px;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 12px 16px;
    }
    
    .header-register .register-form input[type="email"] {
        display: none;
        width: 0;
        padding: 0;
        border: none;
    }
}

@media (max-width: 560px) {
    .header-inner {
        padding: 0 12px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .header-login .login-form input[type="text"],
    .header-login .login-form input[type="password"] {
        display: none;
        width: 0;
        padding: 0;
        border: none;
    }
    
    .header-login .login-form button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .container {
        margin: 12px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .header-login .login-form input[type="text"],
    .header-login .login-form input[type="password"],
    .header-register .register-form input[type="text"],
    .header-register .register-form input[type="password"] {
        display: none;
        width: 0;
        padding: 0;
        border: none;
    }
    
    .header-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .header-nav a {
        text-align: center;
        padding: 12px;
    }
}

/* Focus styles for accessibility */


/* Smooth transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Preview Modal Styles */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.preview-modal.active {
    display: flex;
}

.preview-modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(30, 30, 30, 0.95));
    max-width: 92vw;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(154, 93, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 40px rgba(154, 93, 255, 0.15);
    animation: slideUp 0.3s ease;
}

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

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(154, 93, 255, 0.15);
    background: rgba(154, 93, 255, 0.05);
    flex-shrink: 0;
}

.preview-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.preview-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-base);
    margin: 0;
    word-break: break-word;
    max-width: 400px;
    letter-spacing: 0.01em;
}

.preview-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-ext-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.7));
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.preview-modal-close {
    background: rgba(154, 93, 255, 0.1);
    border: 1px solid rgba(154, 93, 255, 0.2);
    color: var(--text-subdued);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px 12px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.preview-modal-close:hover {
    background: rgba(154, 93, 255, 0.2);
    color: var(--essential-bright-accent);
    border-color: var(--essential-bright-accent);
    transform: scale(1.1);
}

.preview-modal-body {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: rgba(15, 15, 15, 0.5);
}

.preview-image {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.preview-pdf,
.preview-office {
    width: 100%;
    height: 100%;
    border: none;
}

.preview-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 0.9rem;
    color: var(--text-base);
    line-height: 1.6;
    background: rgba(10, 10, 10, 0.6);
    padding: 16px;
    border: 1px solid rgba(154, 93, 255, 0.1);
    margin: 0;
}

.preview-code {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 0.85rem;
    color: var(--text-base);
    line-height: 1.8;
    background: rgba(10, 10, 10, 0.8);
    padding: 16px;
    border: 1px solid rgba(154, 93, 255, 0.15);
    margin: 0;
    overflow-x: auto;
}

.preview-code code {
    font-family: 'Courier New', 'Monaco', monospace;
    color: #e8f0f5;
}

/* Syntax Highlighting Colors */
.code-keyword {
    color: #ff79c6;
    font-weight: bold;
}

.code-string {
    color: #f1fa8c;
}

.code-comment {
    color: #6272a4;
    font-style: italic;
}

.code-number {
    color: #bd93f9;
}

.code-bracket {
    color: #a4e2ff;
}

/* JSON Highlighting */
.json-key {
    color: #50fa7b;
    font-weight: bold;
}

.json-string {
    color: #f1fa8c;
}

.json-number {
    color: #bd93f9;
}

.json-boolean {
    color: #ff79c6;
    font-weight: bold;
}

.json-null {
    color: #8be9fd;
    font-style: italic;
}

/* HTML/XML Highlighting */
.html-tag {
    color: #ff79c6;
}

.html-attr {
    color: #f1fa8c;
}

.html-comment {
    color: #6272a4;
    font-style: italic;
}

/* CSS Highlighting */
.css-selector {
    color: #50fa7b;
    font-weight: bold;
}

.css-property {
    color: #8be9fd;
}

.css-color {
    color: #ffb86c;
    font-weight: bold;
}

.css-string {
    color: #f1fa8c;
}

/* Markdown Highlighting */
.md-heading {
    color: #ff79c6;
    font-weight: bold;
}

.md-bold {
    color: #ffb86c;
    font-weight: bold;
}

.md-italic {
    color: #8be9fd;
    font-style: italic;
}

.md-code {
    color: #50fa7b;
    background: rgba(80, 250, 123, 0.1);
    padding: 2px 6px;
}

.md-list {
    color: #8be9fd;
}

.preview-error {
    color: #ff5555;
    padding: 24px;
    text-align: center;
    font-weight: 300;
    font-size: 0.95rem;
    background: rgba(255, 85, 85, 0.1);
    border: 1px solid rgba(255, 85, 85, 0.2);
    line-height: 1.6;
}

.preview-unsupported {
    color: var(--text-subdued);
    padding: 48px 24px;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.8;
}

.preview-unsupported p {
    margin: 8px 0;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .preview-modal-content {
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .preview-modal-header {
        padding: 16px;
    }
    
    .preview-modal-title {
        font-size: 1rem;
        max-width: 250px;
    }
    
    .preview-modal-body {
        padding: 16px;
    }
    
    .preview-code,
    .preview-text {
        font-size: 0.8rem;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .preview-modal {
        padding: 12px;
    }
    
    .preview-modal-content {
        max-width: 100vw;
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .preview-header-left {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-modal-title {
        font-size: 0.95rem;
    }
    
    .preview-code,
    .preview-text {
        font-size: 0.75rem;
        padding: 10px;
        line-height: 1.5;
    }
}

.preview-btn {
    background: linear-gradient(135deg, var(--bg-elevated-highlight) 0%, var(--bg-elevated-base) 100%);
    border: 1px solid var(--decorative-base);
    color: var(--text-base);
    padding: 8px 12px;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 300;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    margin-right: 6px;
    max-width: 10px;
    max-height: 10px;
}

.preview-btn:hover {
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    color: var(--essential-base);
    border-color: var(--essential-bright-accent);
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
    transform: translateY(-2px);
}

.preview-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .preview-modal-content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 16px;
    }
    
    .preview-modal-body {
        max-height: 60vh;
    }
    
    .preview-pdf {
        height: 60vh;
    }
}

/* Filter Section Styles */
.filter-section {
    margin-bottom: 28px;
    padding: 20px;
    background: var(--bg-tinted-base);
    border: 1px solid var(--decorative-base);
}

.filter-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-base);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 0 1 220px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-subdued);
}

.filter-select,
.filter-input {
    background: var(--bg-elevated-base);
    border: 1px solid var(--decorative-base);
    color: var(--text-base);
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s ease;
    outline: none;
}

.filter-select:hover,
.filter-input:hover {
    border-color: var(--essential-bright-accent);
    background: var(--bg-elevated-highlight);
}

.filter-select:focus,
.filter-input:focus {
    border-color: var(--essential-bright-accent);
    box-shadow: 0 0 0 3px rgba(154, 93, 255, 0.1);
    background: var(--bg-elevated-highlight);
}

.filter-input::placeholder {
    color: var(--text-subdued);
}

.filter-btn,
.filter-reset-btn {
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    border: none;
    color: var(--essential-base);
    padding: 10px 18px;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    display: inline-block;
}

.filter-btn:hover {
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
    transform: translateY(-2px);
}

.filter-btn:active {
    transform: translateY(0);
}

.filter-reset-btn {
    background: var(--decorative-base);
    color: var(--text-base);
    text-decoration: none;
    border: 1px solid var(--decorative-base);
}

.filter-reset-btn:hover {
    background: var(--bg-elevated-highlight);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.filter-results {
    margin-bottom: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--decorative-base);
}

.filter-results p {
    font-size: 0.95rem;
    color: var(--text-subdued);
    font-weight: 300;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-subdued);
    font-style: italic;
}

@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        flex: 0 1 100%;
    }
    
    .filter-btn,
    .filter-reset-btn {
        width: 100%;
    }
}

/* Dashboard Layout */
.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 30px;
}

.dashboard-section {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(154, 93, 255, 0.2);
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
}

.dashboard-section h2 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--essential-bright-accent);
}
.dashboard-section-upload-section {
     max-height: 40vh;
}
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.upload-form .form-group {
    margin-bottom: 0;
}

.upload-form input[type="text"],
.upload-form textarea {
    width: 100%;
    padding: 9px 11px;
    font-size: 0.85rem;
    max-height: 40vh;
}

.upload-form textarea {
    min-height: 70px;
    max-height: 100px;
}

.submit-btn {
    padding: 9px 16px;
    font-size: 0.85rem;
    align-self: stretch;
}

.filter-section-compact {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--decorative-base);
}

.filter-form-compact {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-group-compact {
    flex: 1;
    min-width: 110px;
}

.filter-select {
    width: 100%;
    padding: 7px 9px;
    font-size: 0.85rem;
    background: var(--bg-elevated-base);
    border: 1px solid var(--decorative-base);
    color: var(--text-base);
    outline: none;
    transition: all 0.25s ease;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--essential-bright-accent);
    background: var(--bg-elevated-highlight);
}

.filter-reset-btn-compact {
    display: block;
    background: var(--decorative-base);
    color: var(--text-base);
    border: 1px solid var(--decorative-base);
    padding: 7px 9px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
}

.filter-reset-btn-compact:hover {
    background: var(--bg-elevated-highlight);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.table-compact {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.table-compact thead {
    background: linear-gradient(135deg, var(--essential-bright-accent) 0%, #b580ff 100%);
}

.table-compact th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--essential-base);
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

.table-compact tr {
    background: var(--surface-elevation-1);
    border-bottom: 1px solid var(--decorative-base);
    transition: all 0.2s ease;
}

.table-compact tr:hover {
    background: var(--surface-elevation-2);
    transform: translateX(2px);
}

.table-compact td {
    padding: 8px 10px;
    color: var(--text-base);
    font-weight: 300;
}

.table-compact td span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-btn-compact,
.download-btn-compact {
    padding: 5px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    margin-right: 4px;
    max-width: 10px;
    max-height: 10px;
}

.preview-btn-compact {
    background: var(--bg-elevated-highlight);
    border: 1px solid var(--decorative-base);
    color: var(--text-base);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 300;
}

.preview-btn-compact:hover {
    background: var(--essential-bright-accent);
    color: var(--essential-base);
    box-shadow: 0 2px 8px rgba(154, 93, 255, 0.2);
}

.download-btn-compact {
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    color: var(--essential-base);
    border: none;
    box-shadow: 0 2px 6px rgba(154, 93, 255, 0.2);
}

.download-btn-compact:hover {
    box-shadow: 0 3px 10px rgba(154, 93, 255, 0.3);
    transform: translateY(-1px);
}

.no-files {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-subdued);
    font-style: italic;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        margin: 16px auto;
        padding: 0 16px;
    }
    
    .dashboard-section {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        margin: 12px;
        padding: 0 12px;
        gap: 16px;
    }
    
    .dashboard-section {
        padding: 16px;
    }
    
    .dashboard-section h2 {
        font-size: 1.1rem;
        margin-bottom: 14px;
    }
    
    .filter-form-compact {
        gap: 6px;
    }
    
    .filter-group-compact {
        min-width: 90px;
    }
    
    .table-compact {
        font-size: 0.8rem;
    }
    
    .table-compact th,
    .table-compact td {
        padding: 6px 8px;
    }
}

/* Dashboard Header Styling */
.dashboard-header {
    background: var(--bg-base);
    border-bottom: 1px solid rgba(154, 93, 255, 0.2);
    padding: 20px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.18em;
    color: var(--essential-bright-accent);
}

.dashboard-nav {
    display: flex;
    gap: 2px;
    align-items: center;
}

.dashboard-nav a {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.127em;
    color: var(--text-base);
    text-decoration: none;
    padding-bottom: 6px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.dashboard-nav a:hover {
    color: var(--essential-bright-accent);
    border-bottom-color: var(--essential-bright-accent);
}

.header-user-compact {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-left: 5px;
    border-left: 1px solid rgba(154, 93, 255, 0.2);
}

.user-name-compact {
    font-size: 0.85rem;
    color: var(--text-subdued);
    font-weight: 300;
}

.logout-btn-compact {
    font-size: 0.75rem;
    padding: 6px 12px;
    background: rgba(154, 93, 255, 0.2);
    color: var(--essential-bright-accent);
    border: 1px solid rgba(154, 93, 255, 0.4);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.logout-btn-compact:hover {
    background: rgba(154, 93, 255, 0.3);
    border-color: var(--essential-bright-accent);
}

.login-placeholder {
    font-size: 0.85rem;
    color: var(--text-subdued);
    font-weight: 300;
}

/* Dashboard Form Styling */
.dashboard-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dashboard-form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-subdued);
    text-transform: uppercase;
}

.dashboard-form input[type="file"],
.dashboard-form input[type="text"],
.dashboard-form textarea {
    padding: 10px 12px;
    border: 1px solid rgba(154, 93, 255, 0.2);
    background: rgba(25, 25, 25, 0.6);
    color: var(--text-base);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dashboard-form input[type="file"]:focus,
.dashboard-form input[type="text"]:focus,
.dashboard-form textarea:focus {
    outline: none;
    border-color: var(--essential-bright-accent);
    background: rgba(25, 25, 25, 0.8);
    box-shadow: 0 0 12px rgba(154, 93, 255, 0.15);
}

.dashboard-textarea {
    min-height: 80px;
    resize: vertical;
}

.upload-btn-dashboard {
    padding: 11px 20px;
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
}

.upload-btn-dashboard:hover {
    background: linear-gradient(135deg, rgba(154, 93, 255, 1), rgba(154, 93, 255, 0.9));
    box-shadow: 0 6px 20px rgba(154, 93, 255, 0.4);
    transform: translateY(-2px);
}

.upload-btn-dashboard:active {
    transform: translateY(0);
}

/* Dashboard Table Styling */
.table-dashboard {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table-dashboard thead {
    background: rgba(154, 93, 255, 0.1);
    border-bottom: 2px solid rgba(154, 93, 255, 0.2);
}

.table-dashboard th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--essential-bright-accent);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.table-dashboard tbody tr {
    border-bottom: 1px solid rgba(154, 93, 255, 0.1);
    transition: all 0.3s ease;
}

.table-dashboard tbody tr:hover {
    background: rgba(154, 93, 255, 0.08);
}

.table-dashboard td {
    padding: 11px 10px;
    color: var(--text-base);
}

.table-dashboard td.action-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.preview-btn-compact,
.download-btn-compact {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid rgba(154, 93, 255, 0.3);
    color: var(--essential-bright-accent);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.preview-btn-compact:hover,
.download-btn-compact:hover {
    background: rgba(154, 93, 255, 0.15);
    border-color: var(--essential-bright-accent);
}

/* Dashboard Footer Styling */
.dashboard-footer {
    text-align: center;
    padding: 24px;
    margin-top: 30px;
    border-top: 1px solid rgba(154, 93, 255, 0.2);
    color: var(--text-subdued);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    max-height: 5vh;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .dashboard-container {
        gap: 20px;
        margin: 20px auto;
        padding: 0 20px;
    }
    
    .dashboard-section {
        padding: 20px;
    }
    
    .dashboard-header {
        padding: 16px 24px;
    }
    
    .dashboard-header h1 {
        font-size: 1.4rem;
    }
    
    .dashboard-nav {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 16px auto;
        padding: 0 16px;
    }
    
    .dashboard-section {
        padding: 16px;
    }
    
    .dashboard-header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .dashboard-nav {
        flex-wrap: wrap;
        gap: 12px;
        width: 100%;
    }
    
    .dashboard-nav a {
        font-size: 0.75rem;
    }
    
    .header-user-compact {
        border-left: none;
        border-top: 1px solid rgba(154, 93, 255, 0.2);
        padding-left: 0;
        padding-top: 12px;
        width: 100%;
    }
    
    .table-dashboard {
        font-size: 0.8rem;
    }
    
    .table-dashboard th,
    .table-dashboard td {
        padding: 8px 6px;
    }
    
    .preview-btn-compact,
    .download-btn-compact {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
}

@media (max-width: 560px) {
    .dashboard-header {
        padding: 12px 16px;
    }
    
    .dashboard-header h1 {
        font-size: 1.2rem;
    }
    
    .dashboard-nav {
        font-size: 0.65rem;
        gap: 8px;
    }
    
    .dashboard-section {
        padding: 12px;
    }
    
    .dashboard-form {
        gap: 12px;
    }
    
    .dashboard-form-group label {
        font-size: 0.7rem;
    }
    
    .dashboard-form input,
    .dashboard-form textarea {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
    
    .upload-btn-dashboard {
        padding: 9px 16px;
        font-size: 0.8rem;
    }
    
    .table-dashboard {
        font-size: 0.7rem;
    }
    
    .table-dashboard th,
    .table-dashboard td {
        padding: 6px 4px;
    }
    
    .table-dashboard thead {
        display: none;
    }
    
    .table-dashboard tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid rgba(154, 93, 255, 0.2);
        border-radius: 8px;
        padding: 10px;
    }
    
    .table-dashboard td {
        display: block;
        text-align: right;
        padding: 6px 0;
        border: none;
    }
    
    .table-dashboard td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--essential-bright-accent);
    }
    
    .action-cell {
        justify-content: flex-end;
    }
}

/* Data Show Page Styling */
.data-show-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 30px;
}

.data-show-container h2 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--essential-bright-accent);
    margin: 0 0 20px 0;
    text-transform: uppercase;
}

.data-show-filter {
    background: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(154, 93, 255, 0.15);
    padding: 18px 20px;
    margin-bottom: 20px;
}

.filter-form-inline {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group-inline label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-subdued);
    text-transform: uppercase;
}

.filter-select-inline {
    padding: 8px 12px;
    background: rgba(25, 25, 25, 0.6);
    border: 1px solid rgba(154, 93, 255, 0.2);
    color: var(--text-base);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.filter-select-inline:hover,
.filter-select-inline:focus {
    border-color: var(--essential-bright-accent);
    background: rgba(25, 25, 25, 0.8);
    outline: none;
}

.filter-reset-link {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid rgba(154, 93, 255, 0.3);
    color: var(--text-subdued);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.filter-reset-link:hover {
    border-color: var(--essential-bright-accent);
    color: var(--essential-bright-accent);
    background: rgba(154, 93, 255, 0.1);
}

.table-files {
    width: 100%;
    border-collapse: collapse;
    background: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(154, 93, 255, 0.15);
    overflow: hidden;
}

.table-files thead {
    background: rgba(154, 93, 255, 0.12);
    border-bottom: 2px solid rgba(154, 93, 255, 0.2);
}

.table-files th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--essential-bright-accent);
    text-transform: uppercase;
}

.table-files tbody tr {
    border-bottom: 1px solid rgba(154, 93, 255, 0.1);
    transition: all 0.3s ease;
}

.table-files tbody tr:hover {
    background: rgba(154, 93, 255, 0.08);
}

.table-files td {
    padding: 12px 16px;
    color: var(--text-base);
    font-size: 0.9rem;
}

.table-files td.action-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.preview-btn-files,
.download-btn-files {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid rgba(154, 93, 255, 0.3);
    color: var(--essential-bright-accent);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.preview-btn-files:hover,
.download-btn-files:hover {
    background: rgba(154, 93, 255, 0.15);
    border-color: var(--essential-bright-accent);
}

.no-files-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-subdued);
    font-size: 0.9rem;
    background: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(154, 93, 255, 0.15);
    border-radius: 12px;
}

/* Groups Page Styling */
.groups-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 30px;
}

.groups-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 20px;
}

.groups-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--essential-bright-accent);
    margin: 0 0 8px 0;
    text-transform: uppercase;
}

.groups-subtitle {
    color: var(--text-subdued);
    font-size: 0.9rem;
    margin: 0;
}

.btn-create-group {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
    white-space: nowrap;
}

.btn-create-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(154, 93, 255, 0.4);
}

.groups-filter {
    background: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(154, 93, 255, 0.15);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

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

.group-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(154, 93, 255, 0.15);
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.group-card:hover {
    border-color: rgba(154, 93, 255, 0.3);
    box-shadow: 0 8px 24px rgba(154, 93, 255, 0.15);
    transform: translateY(-4px);
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.group-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--essential-bright-accent);
    flex: 1;
    line-height: 1.3;
}

.group-member-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(154, 93, 255, 0.15);
    color: var(--essential-bright-accent);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.group-card-info {
    font-size: 0.85rem;
    color: var(--text-subdued);
    margin-bottom: 12px;
    flex: 1;
}

.group-card-info p {
    margin: 4px 0;
}

.group-card-info strong {
    color: var(--text-base);
}

.group-description {
    color: var(--text-subdued);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 12px 0;
    flex: 1;
    max-height: 80px;
    overflow: hidden;
}

.group-card-footer {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(154, 93, 255, 0.1);
    align-items: center;
}

.btn-group-join,
.btn-group-leave,
.btn-group-view {
    flex: 1;
    padding: 9px 12px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    height: 36px;
    box-sizing: border-box;
    vertical-align: middle;
}
.btn-group-join {
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    color: white;
    box-shadow: 0 2px 8px rgba(154, 93, 255, 0.2);
}

.btn-group-join:hover {
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
    transform: translateY(-1px);
}

.btn-group-leave {
    background: rgba(255, 85, 85, 0.15);
    color: #ff5555;
    border-color: rgba(255, 85, 85, 0.3);
}

.btn-group-leave:hover {
    background: rgba(255, 85, 85, 0.25);
    border-color: #ff5555;
}

.btn-group-view {
    background: rgba(154, 93, 255, 0.15);
    color: var(--essential-bright-accent);
    border-color: rgba(154, 93, 255, 0.3);
}

.btn-group-view:hover {
    background: rgba(154, 93, 255, 0.25);
    border-color: var(--essential-bright-accent);
}

.group-login-required {
    color: var(--text-subdued);
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
    width: 100%;
}

.no-groups-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 30px;
    color: var(--text-subdued);
    font-size: 1rem;
}

.no-groups-message p {
    margin: 8px 0;
}

/* Create Group Modal */
.group-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.group-modal.active {
    display: flex;
}

.group-modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(30, 30, 30, 0.95));
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(154, 93, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s ease;
}

.group-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(154, 93, 255, 0.15);
    background: rgba(154, 93, 255, 0.05);
}

.group-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-base);
}

.group-modal-close {
    background: rgba(154, 93, 255, 0.1);
    border: 1px solid rgba(154, 93, 255, 0.2);
    color: var(--text-subdued);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.group-modal-close:hover {
    background: rgba(154, 93, 255, 0.2);
    color: var(--essential-bright-accent);
}

.group-form {
    padding: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-subdued);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(25, 25, 25, 0.6);
    border: 1px solid rgba(154, 93, 255, 0.2);
    color: var(--text-base);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--essential-bright-accent);
    background: rgba(25, 25, 25, 0.8);
    box-shadow: 0 0 12px rgba(154, 93, 255, 0.15);
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit {
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    color: white;
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(154, 93, 255, 0.4);
}

.btn-cancel {
    background: rgba(154, 93, 255, 0.1);
    color: var(--text-subdued);
    border: 1px solid rgba(154, 93, 255, 0.2);
}

.btn-cancel:hover {
    background: rgba(154, 93, 255, 0.2);
    color: var(--text-base);
}

/* Group Detail Page */
.group-detail-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 30px;
}

.group-detail-header {
    margin-bottom: 30px;
}

.btn-back {
    display: inline-block;
    padding: 8px 14px;
    background: rgba(154, 93, 255, 0.1);
    color: var(--essential-bright-accent);
    border: 1px solid rgba(154, 93, 255, 0.3);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(154, 93, 255, 0.2);
    border-color: var(--essential-bright-accent);
}

.group-detail-header h2 {
    margin: 0 0 12px 0;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-align: center;
}

.group-detail-meta {
    display: flex;
    gap: 20px;
    color: var(--text-subdued);
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.group-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.group-detail-section {
    background: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(154, 93, 255, 0.15);
    
    padding: 20px;
}

.group-detail-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--essential-bright-accent);
    margin: 0 0 16px 0;
}

.group-info-box p {
    margin: 10px 0;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.group-info-box strong {
    color: var(--text-base);
}

.group-members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.member-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(154, 93, 255, 0.05);
    border: 1px solid rgba(154, 93, 255, 0.1);
    text-align: center;
}

.member-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.7));
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.95rem;
}

.member-name {
    font-size: 0.85rem;
    color: var(--text-subdued);
    word-break: break-word;
}

.group-detail-files {
    background: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(154, 93, 255, 0.15);
    padding: 20px;
    margin-bottom: 30px;
}

.group-detail-files h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--essential-bright-accent);
    margin: 0 0 16px 0;
}

.group-detail-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    justify-content: center;
}

.btn-edit,
.btn-delete {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    color: white;
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(154, 93, 255, 0.4);
}

.btn-delete {
    background: rgba(255, 85, 85, 0.15);
    color: #ff5555;
    border: 1px solid rgba(255, 85, 85, 0.3);
}

.btn-delete:hover {
    background: rgba(255, 85, 85, 0.25);
    border-color: #ff5555;
}

/* Responsive Groups */
@media (max-width: 1024px) {
    .groups-container {
        padding: 0 20px;
    }

    .groups-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .group-detail-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .groups-container {
        padding: 0 16px;
    }

    .groups-header {
        flex-direction: column;
    }

    .btn-create-group {
        width: 100%;
    }

    .groups-grid {
        grid-template-columns: 1fr;
    }

    .group-modal-content {
        max-width: 100%;
        border-radius: 4px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .group-members-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .group-detail-actions {
        flex-wrap: wrap;
    }
}

/* Header Auth Buttons */
.header-auth {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-login-header,
.btn-register-header {
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-login-header {
    background: rgba(154, 93, 255, 0.2);
    color: var(--essential-bright-accent);
    border: 1px solid var(--essential-bright-accent);
}

.btn-login-header:hover {
    background: rgba(154, 93, 255, 0.3);
    box-shadow: 0 0 12px rgba(154, 93, 255, 0.25);
}

.btn-register-header {
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(154, 93, 255, 0.25);
}

.btn-register-header:hover {
    background: linear-gradient(135deg, rgba(154, 93, 255, 1), rgba(154, 93, 255, 0.9));
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.35);
    transform: translateY(-1px);
}

/* ============ AUTH PAGE STYLES ============ */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #121212 0%, #1a1a1a 50%, #0f0f0f 100%);
    padding: 20px;
}

.auth-page-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

.auth-page-container.auth-page-reversed {
    grid-template-columns: 1fr 1fr;
}

/* Auth Form Section */
.auth-form-section {
    display: flex;
    justify-content: center;
}

.auth-form-card {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(154, 93, 255, 0.15);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideInRight 0.5s ease;
}

.auth-page-container.auth-page-reversed .auth-form-card {
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-form-header {
    margin-bottom: 30px;
    text-align: center;
}

.auth-form-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: white;
    margin: 0 0 8px 0;
    letter-spacing: 0.02em;
}

.auth-form-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
}

.auth-form-group label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.auth-input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    background: rgba(40, 40, 40, 0.6);
    border: 1.5px solid rgba(154, 93, 255, 0.15);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-input:focus {
    outline: none;
    background: rgba(40, 40, 40, 0.8);
    border-color: var(--essential-bright-accent);
    box-shadow: 0 0 0 3px rgba(154, 93, 255, 0.1), 0 0 12px rgba(154, 93, 255, 0.2);
}

.auth-help-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
}

.auth-btn {
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--essential-bright-accent), rgba(154, 93, 255, 0.8));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(154, 93, 255, 0.3);
    text-transform: uppercase;
    margin-top: 10px;
}

.auth-btn:hover {
    background: linear-gradient(135deg, rgba(154, 93, 255, 1), rgba(154, 93, 255, 0.9));
    box-shadow: 0 12px 32px rgba(154, 93, 255, 0.4);
    transform: translateY(-2px);
}

.auth-btn:active {
    transform: translateY(0);
}

/* Auth Alerts */
.auth-alert {
    padding: 14px 16px;
    border-radius: 10px;
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.auth-alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #51cf66;
}

.alert-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-content p {
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* Auth Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(154, 93, 255, 0.15);
}

.auth-divider span {
    display: inline-block;
    background: rgba(30, 30, 30, 0.8);
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.auth-link {
    color: var(--essential-bright-accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: rgba(154, 93, 255, 1.2);
    text-decoration: underline;
}

/* Auth Info Section */
.auth-info-section {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInLeft 0.5s ease;
}

.auth-info-section-left {
    animation: slideInRight 0.5s ease 0.1s both;
}

.auth-info-content {
    text-align: center;
}

.auth-info-content h2 {
    font-size: 32px;
    font-weight: 600;
    color: white;
    margin: 0 0 30px 0;
    letter-spacing: 0.02em;
}

.auth-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.auth-info-card {
    padding: 24px;
    background: rgba(40, 40, 40, 0.4);
    border: 1px solid rgba(154, 93, 255, 0.1);
    transition: all 0.3s ease;
}

.auth-info-card:hover {
    background: rgba(40, 40, 40, 0.6);
    border-color: rgba(154, 93, 255, 0.25);
    transform: translateY(-4px);
}

.auth-info-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.auth-info-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0 0 8px 0;
}

.auth-info-card p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-page-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .auth-form-card {
        max-width: 100%;
    }

    .auth-info-content h2 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .auth-page-wrapper {
        padding: 20px;
    }

    .auth-page-container {
        gap: 30px;
    }

    .auth-form-card {
        padding: 30px 24px;
    }

    .auth-form-header h1 {
        font-size: 24px;
    }

    .auth-form-header p {
        font-size: 13px;
    }

    .auth-info-content h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .auth-info-grid {
        gap: 16px;
    }

    .auth-info-card {
        padding: 18px;
    }

    .auth-info-icon {
        font-size: 28px;
    }

    .auth-info-card h3 {
        font-size: 14px;
    }

    .auth-info-card p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .auth-page-wrapper {
        padding: 16px;
    }

    .auth-form-card {
        padding: 24px 18px;
        border-radius: 12px;
    }

    .auth-form-header h1 {
        font-size: 22px;
    }

    .auth-form-header p {
        font-size: 12px;
    }

    .auth-form {
        gap: 16px;
    }

    .auth-input {
        padding: 11px 12px 11px 40px;
        font-size: 13px;
    }

    .auth-input-icon {
        font-size: 16px;
        left: 12px;
    }

    .auth-btn {
        padding: 11px 20px;
        font-size: 12px;
    }

    .auth-alert {
        padding: 12px 14px;
        gap: 10px;
    }

    .alert-icon {
        font-size: 16px;
    }

    .alert-content p {
        font-size: 12px;
    }

    .auth-info-content h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .auth-info-grid {
        gap: 12px;
    }

    .auth-info-card {
        padding: 16px 12px;
    }

    .auth-info-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .auth-info-card h3 {
        font-size: 13px;
    }

    .auth-info-card p {
        font-size: 11px;
    }

    .auth-footer p {
        font-size: 12px;
    }
}

/* ==================== PROFILE PAGE STYLES ==================== */

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

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--decorative-base);
}

.profile-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-bright-accent);
    margin: 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-card {
    background: var(--bg-elevated-base);
    border: 1px solid var(--decorative-base);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.profile-card:hover {
    border-color: var(--text-bright-accent);
    box-shadow: 0 8px 24px rgba(154, 93, 255, 0.1);
}

.profile-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-base);
    margin-bottom: 20px;
}

.profile-avatar-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-basic-info h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.profile-email,
.profile-joined {
    color: var(--text-subdued);
    font-size: 14px;
    font-weight: 300;
    margin: 4px 0;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--decorative-base);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-bright-accent);
}

.stat-label {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-subdued);
    margin-top: 4px;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-base);
}

.profile-input,
.profile-textarea {
    background: var(--essential-subdued);
    border: 1px solid var(--decorative-base);
    color: var(--text-base);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 300;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.profile-input:focus,
.profile-textarea:focus {
    outline: none;
    border-color: var(--text-bright-accent);
    background: rgba(154, 93, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(154, 93, 255, 0.1);
}

.profile-textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 200px;
}

.char-count {
    font-size: 12px;
    color: var(--text-subdued);
    font-weight: 300;
    text-align: right;
}

/* Color Picker */
.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.color-option {
    cursor: pointer;
}

.color-swatch {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option input:checked + .color-swatch {
    border-color: var(--text-base);
    box-shadow: 0 0 0 2px var(--bg-elevated-base), 0 0 12px rgba(154, 93, 255, 0.3);
}

.color-option:hover .color-swatch {
    transform: scale(1.05);
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Buttons */
.btn-profile-save,
.btn-profile-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-profile-save {
    background: linear-gradient(135deg, var(--text-bright-accent), #7c3ff2);
    color: white;
    align-self: flex-start;
}

.btn-profile-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(154, 93, 255, 0.3);
}

.btn-profile-save:active {
    transform: translateY(0);
}

.btn-profile-danger {
    background: var(--danger-base);
    color: white;
    align-self: flex-start;
}

.btn-profile-danger:hover {
    background: #d91f2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(226, 33, 52, 0.3);
}

/* Profil Card Varianten */
.profile-card-full {
    grid-column: 1 / -1;
}

.profile-card-danger {
    border-color: var(--danger-base);
}

.danger-text {
    color: var(--text-subdued);
    font-size: 14px;
    font-weight: 300;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(81, 207, 102, 0.1);
    border: 1px solid rgba(81, 207, 102, 0.3);
    color: #51cf66;
}

.alert-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

/* ==================== HEADER DROPDOWN STYLES ==================== */

.header-user-dropdown {
    position: relative;
    display: inline-block;
}

.user-name-dropdown-btn {
    background: transparent;
    border: 1px solid var(--text-subdued);
    color: var(--text-subdued);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.user-name-dropdown-btn:hover {
    color: var(--text-bright-accent);
    border-color: var(--text-bright-accent);
    background: rgba(154, 93, 255, 0.05);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-elevated-base);
    border: 1px solid var(--decorative-base);
    border-radius: 2px;
    min-width: 200px;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.header-user-dropdown:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-subdued);
    text-decoration: none;
    font-size: 14px;
    font-weight: 300;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-item:first-child {
   border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.dropdown-item:hover {
    background: rgba(154, 93, 255, 0.1);
    color: var(--text-bright-accent);
    border-left-color: var(--text-bright-accent);
}

.dropdown-divider {
    height: 1px;
    background: var(--decorative-base);
    margin: 4px 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .form-group-row {
        grid-template-columns: 1fr;
    }

    .color-picker-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-avatar-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .profile-header h2 {
        font-size: 22px;
    }

    .profile-card {
        padding: 16px;
    }

    .color-picker-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .user-dropdown-menu {
        right: auto;
        left: 0;
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 12px;
    }

    .profile-card {
        padding: 12px;
    }

    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .profile-header h2 {
        font-size: 18px;
    }

    .color-picker-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-group-row {
        grid-template-columns: 1fr;
    }

    .user-dropdown-menu {
        min-width: 160px;
    }

    .dropdown-item {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* ==================== MATERIALS/LERNUNTERLAGEN PAGE - SIDEBAR LAYOUT ==================== */

.materials-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px 32px 8px;
    background-color:var(--bg-base);
}

.materials-topbar-left h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 6px 0;
}

.materials-eyebrow {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--text-subdued);
}

.materials-topbar-left p {
    color: var(--text-subdued);
    font-size: 14px;
    font-weight: 300;
    max-width: 520px;
}

.materials-topbar-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.topbar-chip {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(154, 93, 255, 0.12);
    border: 1px solid rgba(154, 93, 255, 0.3);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-bright-accent);
}

.topbar-action {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--text-bright-accent);
    color: var(--text-bright-accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s ease;
}

.topbar-action:hover {
    background: var(--text-bright-accent);
    color: #fff;
}

.materials-layout {
    display: flex;
    min-height: calc(100vh - 220px);
    border-top: 1.5px solid rgba(255,255,255,0.02);
    border-bottom: 1.5px solid rgba(255,255,255,0.02);
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(154,93,255,0.05));
}

/* Sidebar */
.materials-sidebar {
    width: 260px;
    background: var(--bg-base);
    border-right: 1.5px solid rgba(255,255,255,0.02);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 18px;
    border-bottom: 1.5px solid rgba(255,255,255,0.02);
    position: sticky;
    top: 0;
    z-index: 5;
}

.sidebar-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-bright-accent);
    letter-spacing: 0.08em;
}

.subjects-list {
    flex: 1;
    overflow-y: auto;
}

.sidebar-empty {
    padding: 30px 16px;
    text-align: center;
}

.sidebar-empty p {
    color: var(--text-subdued);
    font-size: 13px;
}

/* Subject Accordion */
.subject-accordion {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.subject-accordion-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 13px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-base);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.subject-accordion-btn:hover {
    background: rgba(154, 93, 255, 0.05);
}



.subject-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subject-count {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-subdued);
}

.accordion-icon {
    font-size: 12px;
    color: var(--text-subdued);
    transition: transform 0.3s ease;
}

/* Subject Files List */
.subject-files {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    background: rgba(255, 255, 255, 0.02);
}

.subject-files.active {
    max-height: 320px;
    overflow-y: auto;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 34px;
    color: var(--text-subdued);
    text-decoration: none;
    font-size: 12px;
    font-weight: 300;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.file-list-item:hover {
    background: rgba(154, 93, 255, 0.12);
    color: var(--text-base);
    border-left-color: var(--text-bright-accent);
}

.file-list-item.active {
    background: rgba(154, 93, 255, 0.18);
    color: var(--text-bright-accent);
    border-left-color: var(--text-bright-accent);
    font-weight: 600;
}

.file-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Filter Section in Sidebar */
.filter-section {
    padding: 15px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.filter-section h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-bright-accent);
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-option {
    display: block;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-subdued);
    text-decoration: none;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    cursor: pointer;
}

.filter-option:hover {
    background: rgba(154, 93, 255, 0.12);
    color: var(--text-base);
    border-left-color: var(--text-bright-accent);
}

.filter-option.active {
    background: rgba(154, 93, 255, 0.18);
    color: var(--text-bright-accent);
    border-left-color: var(--text-bright-accent);
    font-weight: 600;
}

.filter-select {
    width: 100%;
    padding: 8px 10px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    color: #333;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    outline: none;
}

.filter-select:hover {
    border-color: #999;
    background: #e8e8e8;
}

.filter-select:focus {
    border-color: #666;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(102, 102, 102, 0.2);
}

.filter-submit {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #9A5DFF, #b580ff);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-submit:hover {
    background: linear-gradient(135deg, #b580ff, #9A5DFF);
    box-shadow: 0 4px 12px rgba(154, 93, 255, 0.3);
}

.filter-submit:active {
    transform: scale(0.98);
}

/* Main Content Area */
.materials-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    background-color: var(--bg-base);
}

/* File Detail View */
.file-detail-view {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    background-color: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.file-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.file-detail-title {
    display: flex;
    gap: 14px;
    flex: 1;
}

.file-detail-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.file-detail-title h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.file-detail-subtitle {
    font-size: 13px;
    color: var(--text-subdued);
}

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

.btn-file-action {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-file-action:not(.btn-download) {
    background: linear-gradient(135deg, var(--text-bright-accent), #7c3ff2);
    color: white;
}

.btn-download {
    background: transparent;
    border: 1px solid var(--text-bright-accent);
    color: var(--text-bright-accent);
}

.btn-file-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(154, 93, 255, 0.3);
}

/* File Detail Body */
.file-detail-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


.file-info-section,
.file-description-section,
.file-preview-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 20px;
}

.file-info-section h3,
.file-description-section h3,
.file-preview-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-base);
    margin: 0 0 16px 0;
}

.file-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-subdued);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-base);
}

.file-description-text {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-subdued);
    line-height: 1.6;
    margin: 0;
}

/* Preview Container */
.file-preview-container {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.05);
}

.btn-load-preview {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--text-bright-accent), #7c3ff2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(154, 93, 255, 0.3);
}

.preview-loading,
.preview-error {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-subdued);
    text-align: center;
}

.preview-error {
    color: var(--danger-base);
}

.preview-image {
    max-width: 100%;
    height: auto;
}

.preview-pdf,
.preview-office {
    width: 100%;
    height: 600px;
    border: none;
}

.preview-code,
.preview-text {
    width: 100%;
    background: var(--essential-base);
    color: var(--text-base);
    padding: 20px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    overflow-x: auto;
    margin: 0;
}

/* Empty State in Main */
.materials-main .materials-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
    border: 1px dashed rgba(255,255,255,0.08);
    background: rgba(15,15,15,0.4);
}

/* Notes Page */
.notes-page {
    max-width: 100%;
    margin:0 auto 60px;
}

.notes-topbar {
    margin-bottom: 18px;
}

.notes-eyebrow {
    text-transform: uppercase;
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    color: var(--text-subdued);
    margin: 0;
}

.notes-alert {
    margin: 24px auto 0;
    max-width: 900px;
}

.notes-layout {
    display: flex;
    gap: 24px;
    min-height: 520px;
}

.notes-sidebar {
    width: 240px;
    background: var(--bg-elevated-base);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.notes-sidebar-section + .notes-sidebar-section {
    margin-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.04);
    padding-top: 18px;
}

.notes-sidebar-title {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-subdued);
    padding: 0 20px 10px;
}

.notes-sidebar-list {
    flex: 1;
    overflow-y: auto;
}

.notes-sidebar-item {
    display: block;
    padding: 12px 20px;
    border-left: 4px solid transparent;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    text-decoration: none;
    color: var(--text-base);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.notes-sidebar-item:hover,
.notes-sidebar-item.active {
    background: rgba(255,255,255,0.04);
    border-left-color: var(--essential-bright-accent);
}

.note-item-title {
    font-weight: 400;
    font-size: 0.95rem;
}

.note-item-meta {
    font-size: 0.75rem;
    color: var(--text-subdued);
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.note-item-owner {
    font-size: 0.75rem;
    color: var(--text-subdued);
    margin-top: 6px;
}

.notes-sidebar-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-subdued);
}

.notes-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notes-editor-panel,
.notes-detail-panel {
    background: var(--bg-elevated-base);
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.05);
}

.note-detail-actions {
    margin: 12px 0;
    display: flex;
    gap: 12px;
}

.btn-edit-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--essential-bright-accent);
    color: var(--text-base);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-edit-note:hover {
    background: rgba(154, 93, 255, 0.15);
}

.btn-edit-note.secondary {
    border-color: rgba(255,255,255,0.25);
    color: var(--text-subdued);
}

.btn-edit-note.secondary:hover {
    background: rgba(255,255,255,0.08);
}

.notes-panel-header h3 {
    margin: 4px 0 0;
}

.notes-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.notes-form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notes-form-row label {
    font-size: 0.85rem;
    color: var(--text-subdued);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notes-form-row input,
.notes-form-row textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.35);
    color: var(--text-base);
    padding: 14px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.notes-form-row textarea {
    resize: vertical;
}

.notes-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.05);
}

.notes-toolbar button {
    background: rgba(255,255,255,0.05);
    color: var(--text-base);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.notes-toolbar button:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.notes-submit-btn {
    align-self: flex-start;
    padding: 14px 26px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, var(--essential-bright-accent), #b580ff);
    color: var(--essential-base);
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notes-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(154, 93, 255, 0.35);
}

.notes-empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-subdued);
    border: 1px dashed rgba(255,255,255,0.12);
}

.note-date {
    font-size: 0.8rem;
    color: var(--text-subdued);
}

.notes-detail-panel {
    flex: 1;
}

.notes-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.note-detail-owner {
    font-size: 0.85rem;
    color: var(--text-subdued);
    margin: 6px 0 0;
}

.notes-detail-body {
    line-height: 1.7;
    color: var(--text-base);
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.04);
    padding: 16px;
    border-radius: 8px;
}

.materials-main .empty-state-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.materials-main .materials-empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-base);
    margin: 0 0 12px 0;
}

.materials-main .materials-empty-state p {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-subdued);
    margin: 0;
    max-width: 500px;
}

/* Responsive */
@media (max-width: 1024px) {
    .materials-sidebar {
        width: 220px;
    }

    .materials-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-detail-view {
        padding: 18px;
    }

    .file-detail-header {
        flex-direction: column;
    }

    .file-detail-actions {
        width: 100%;
    }

    .btn-file-action {
        flex: 1;
        justify-content: center;
    }

    .notes-layout {
        flex-direction: column;
    }

    .notes-sidebar {
        width: 100%;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .materials-layout {
        flex-direction: column;
        height: auto;
    }

    .materials-sidebar {
        width: 100%;
        max-height: 45vh;
    }

    .materials-main {
        padding: 20px;
    }

    .file-detail-view {
        padding: 16px;
    }

    .file-detail-title {
        flex-direction: column;
        gap: 12px;
    }

    .file-detail-icon {
        font-size: 36px;
    }

    .file-detail-title h2 {
        font-size: 22px;
    }

    .file-info-grid {
        grid-template-columns: 1fr;
    }

    .file-detail-actions {
        flex-direction: column;
    }

    .notes-page {
        padding: 0 18px 40px;
    }

    .notes-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .notes-sidebar-list {
        width: 100%;
        max-height: 240px;
    }

    .notes-editor-panel,
    .notes-detail-panel {
        padding: 20px;
    }

    .notes-toolbar {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .sidebar-header {
        padding: 12px 16px;
    }

    .subject-accordion-btn {
        padding: 11px 14px;
    }

    .materials-main {
        padding: 14px;
    }

    .file-detail-title h2 {
        font-size: 19px;
    }

    .btn-file-action {
        font-size: 12px;
        padding: 8px 14px;
    }

    .file-preview-container {
        min-height: 260px;
    }

    .notes-toolbar button {
        flex: 1 1 48%;
    }
}

/* Leaderboard styles - unified with notes design, dark mode */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 0.7em 1em;
    margin-bottom: 0.5em;
    background: var(--bg-elevated-base);
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-base);
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: background 0.2s, border 0.2s;
}
.leaderboard-item:hover {
    background: var(--bg-elevated-highlight);
}
.leaderboard-item.top-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffd700;
    color: #000;
}
.leaderboard-item.top-2 {
    background: linear-gradient(135deg, #c0c0c0, #e0e0e0);
    border-color: #c0c0c0;
    color: #000;
}
.leaderboard-item.top-3 {
    background: linear-gradient(135deg, #cd7f32, #d4a574);
    border-color: #cd7f32;
    color: #000;
}
.leaderboard-rank {
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 1em;
    min-width: 40px;
    color: var(--text-base);
}
.leaderboard-info {
    flex: 1;
}
.leaderboard-username {
    font-weight: 500;
    margin-bottom: 0.2em;
    color: var(--text-base);
}
.leaderboard-stats {
    display: flex;
    gap: 1em;
    font-size: 0.9em;
    color: var(--text-subdued);
}
.leaderboard-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated-base);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.05);
}
.leaderboard-table th,
.leaderboard-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-base);
}
.leaderboard-table th {
    background: var(--bg-elevated-highlight);
    font-weight: 600;
    color: var(--text-base);
}
.leaderboard-table tr.top-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
}
.leaderboard-table tr.top-2 {
    background: linear-gradient(135deg, #c0c0c0, #e0e0e0);
    color: #000;
}
.leaderboard-table tr.top-3 {
    background: linear-gradient(135deg, #cd7f32, #d4a574);
    color: #000;
}
.leaderboard-table tr:hover {
    background: var(--bg-elevated-highlight);
}
.no-data {
    text-align: center;
    color: var(--text-subdued);
    padding: 2rem;
}

/* Dashboard styles */
.dashboard-page {
    padding: 4px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-topbar {
    margin-bottom: 0.8rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    background: var(--bg-elevated-base);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 2px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-base);
    font-size: 1.1rem;
    font-weight: 600;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-bright-accent);
    margin: 0 0 0.5rem 0;
}

.card-sub {
    font-size: 0.9rem;
    color: var(--text-subdued);
    margin: 0 0 1rem 0;
}

.card-link {
    color: var(--text-bright-accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.card-link:hover {
    text-decoration: underline;
}

.leaderboard-snippet .top-players {
    margin-bottom: 1rem;
}

.top-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.top-player.top-1 .rank {
    color: #ffd700;
}
.top-player.top-2 .rank {
    color: #c0c0c0;
}
.top-player.top-3 .rank {
    color: #cd7f32;
}

.top-player .name {
    flex: 1;
    color: var(--text-base);
}

.top-player .score {
    color: var(--text-subdued);
    font-size: 0.9rem;
}

.dashboard-upload-section {
    background: var(--bg-elevated-base);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1rem;
    margin-top: 1rem;
}

.dashboard-upload-section h2 {
    color: var(--text-base);
    margin-bottom: 1rem;
}

.upload-card {
    grid-column: span 2; /* Make upload card span 2 columns */
}

.upload-form-container {
    margin-top: 0.8rem;
}

.dashboard-form-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: flex;
    flex-direction: column;
}

.input-compact, .textarea-compact {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-base);
    color: var(--text-base);
    font-size: 0.9rem;
}

.input-compact:focus, .textarea-compact:focus {
    outline: none;
    border-color: var(--text-bright-accent);
}

.textarea-compact {
    resize: vertical;
    min-height: 60px;
}

.upload-btn-compact {
    background: var(--text-bright-accent);
    color: #000;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.upload-btn-compact:hover {
    background: #9a5dffcc;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-card {
        padding: 1rem;
    }
    .upload-card {
        grid-column: span 1; /* Single column on mobile */
    }
}

/* Office preview fallback styles */
.preview-office-fallback {
    text-align: center;
    padding: 2rem;
    background: var(--bg-elevated-base);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.preview-office-fallback p {
    color: var(--text-subdued);
    margin-bottom: 1rem;
}

.download-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--text-bright-accent);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.download-link:hover {
    background: #7c3aed;
}

.group-detail-main{
    flex: 1;
    overflow-y: auto;
    background-color: var(--bg-base);
}

/* ==================== UPLOAD FORM STYLES ==================== */

.file-upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

.upload-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upload-field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-base);
    margin-bottom: 4px;
}

.upload-field input,
.upload-field textarea,
.upload-field select {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-base);
    font-size: 14px;
    transition: all 0.2s ease;
}

.upload-field input:focus,
.upload-field textarea:focus,
.upload-field select:focus {
    outline: none;
    border-color: var(--text-bright-accent);
    background: rgba(154, 93, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(154, 93, 255, 0.1);
}

.upload-field input::placeholder,
.upload-field textarea::placeholder {
    color: var(--text-subdued);
}

.upload-field.full-width {
    grid-column: 1 / -1;
}

.upload-field textarea {
    resize: vertical;
    min-height: 80px;
}

.upload-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.upload-submit-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--text-bright-accent), #7c3ff2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(154, 93, 255, 0.3);
}

.upload-submit-btn:active {
    transform: translateY(0);
}

/* File Input Styling */
.upload-field input[type="file"] {
    padding: 8px;
    cursor: pointer;
}

.upload-field input[type="file"]::-webkit-file-upload-button {
    padding: 8px 16px;
    background: rgba(154, 93, 255, 0.1);
    border: 1px solid rgba(154, 93, 255, 0.3);
    border-radius: 6px;
    color: var(--text-bright-accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-field input[type="file"]::-webkit-file-upload-button:hover {
    background: rgba(154, 93, 255, 0.2);
}

/* Responsive Upload Form */
@media (max-width: 768px) {
    .upload-form-grid {
        grid-template-columns: 1fr;
    }

    .upload-field.full-width {
        grid-column: auto;
    }

    .upload-actions {
        justify-content: center;
    }

    .group-files-section .file-share-section {
        padding: 16px 24px;
    }
}

/* ==================== GROUP FILES SECTION ==================== */

.group-files-section {
    margin-top: 32px;
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(154,93,255,0.03));
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.group-files-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-bright-accent);
    margin: 0;
    padding: 24px 32px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(154, 93, 255, 0.02);
}

/* File Sharing Section */
.file-share-section {
    padding: 20px 32px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.file-share-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-base);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-share-section h4::before {
    content: "📤";
    font-size: 18px;
}

.file-share-section form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.file-share-section select {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--essential-bright-accent)!important;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-share-section select:focus {
    outline: none;
    border-color: var(--text-bright-accent);
    background: rgba(154, 93, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(154, 93, 255, 0.1);
}

.file-share-section select option {
    background: var(--bg-base);
    color: var(--text-base);
}

.file-share-section button[type="submit"] {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--text-bright-accent), #7c3ff2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-share-section button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(154, 93, 255, 0.3);
}

.file-share-section button[type="submit"]:active {
    transform: translateY(0);
}

/* Materials Topbar in Group Files */
.group-files-section .materials-topbar {
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.group-files-section .materials-topbar-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.group-files-section .topbar-chip {
    padding: 6px 14px;
    background: rgba(154, 93, 255, 0.08);
    border: 1px solid rgba(154, 93, 255, 0.2);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-bright-accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Materials Layout in Group Files */
.group-files-section .materials-layout {
    border: none;
    background: transparent;
    min-height: 500px;
}

/* Enhanced Sidebar for Group Files */
.group-files-section .materials-sidebar {
    border-right: 1px solid rgba(255,255,255,0.08);
    background: rgba(255, 255, 255, 0.01);
}

.group-files-section .sidebar-header {
    background: rgba(154, 93, 255, 0.02);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.group-files-section .sidebar-header h2 {
    color: var(--text-bright-accent);
    font-weight: 600;
}

/* Enhanced Subject Accordion */
.group-files-section .subject-accordion-btn {
    padding: 14px 20px;
    transition: all 0.2s ease;
    position: relative;
}

.group-files-section .subject-accordion-btn:hover {
    background: rgba(154, 93, 255, 0.08);
}

.group-files-section .subject-accordion-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.2s ease;
}

.group-files-section .subject-files.active .subject-accordion-btn::before {
    background: var(--text-bright-accent);
}

.group-files-section .subject-name {
    font-weight: 500;
}

.group-files-section .subject-count {
    background: rgba(154, 93, 255, 0.1);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
}

/* Enhanced File List Items */
.group-files-section .file-list-item {
    padding: 12px 20px 12px 40px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.group-files-section .file-list-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.group-files-section .file-list-item:hover {
    background: rgba(154, 93, 255, 0.06);
    border-left-color: rgba(154, 93, 255, 0.3);
}

.group-files-section .file-list-item:hover::before {
    background: var(--text-bright-accent);
    transform: translateY(-50%) scale(1.2);
}

.group-files-section .file-list-item.active {
    background: rgba(154, 93, 255, 0.12);
    border-left-color: var(--text-bright-accent);
    font-weight: 500;
}

.group-files-section .file-list-item.active::before {
    background: var(--text-bright-accent);
    transform: translateY(-50%) scale(1.2);
}

/* Enhanced Main Content Area */
.group-files-section .materials-main {
    padding: 24px;
    background: transparent;
}

/* Enhanced File Detail View */
.group-files-section .file-detail-view {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.group-files-section .file-detail-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.group-files-section .file-detail-title h2 {
    color: var(--text-bright-accent);
}

/* Enhanced Info Sections */
.group-files-section .file-info-section,
.group-files-section .file-description-section,
.group-files-section .file-preview-section {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}

.group-files-section .file-info-section h3,
.group-files-section .file-description-section h3,
.group-files-section .file-preview-section h3 {
    color: var(--text-bright-accent);
    font-weight: 600;
}

/* Enhanced Preview Container */
.group-files-section .file-preview-container {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
}

/* Enhanced Empty State */
.group-files-section .materials-empty-state {
    background: rgba(15,15,15,0.3);
    border: 1px dashed rgba(154, 93, 255, 0.2);

}

.group-files-section .materials-empty-state .empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.group-files-section .materials-empty-state h3 {
    color: var(--text-bright-accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.group-files-section .materials-empty-state p {
    color: var(--text-subdued);
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Design for Group Files */
@media (max-width: 1024px) {
    .group-files-section .materials-layout {
        flex-direction: column;
    }

    .group-files-section .materials-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        max-height: 300px;
    }

    .group-files-section .materials-main {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .group-files-section {
        margin: 20px 0;
    }

    .group-files-section h3 {
        padding: 20px 24px 12px;
        font-size: 18px;
    }

    .file-share-section {
        padding: 16px 24px;
    }

    .file-share-section form {
        flex-direction: column;
        align-items: stretch;
    }

    .file-share-section select {
        min-width: auto;
    }

    .group-files-section .materials-topbar {
        padding: 12px 24px;
    }

    .group-files-section .materials-main {
        padding: 16px;
    }

    .group-files-section .file-detail-view {
        padding: 20px;
    }
    .group-files-section .file-detail-title h2 {
        font-size: 20px;
    }
}
.groups-det-header{
    border-bottom: 1.5px solid rgba(255,255,255,0.1);
    padding-bottom: 12px;
    margin-bottom: 16px;
}
.groups-det-header h2{
    color: var(--text-bright-accent);
    font-weight: 300;
    
}

.like-btn-files{
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 20px;

}
.like-btn-files:hover {
    color: none;
    animation: none;
}