/* Variables for Themes */
:root,
[data-theme="antifasih-dark"] {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-gradient: #3b82f6;
    --border-color: #334155;
    --hover-bg: #334155;
    --active-bg: #475569;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --glass-bg: #0f172a;
    --glass-border: #334155;
    --abstract-display: none;
}

[data-theme="antifasih-light"] {
    --bg-color: #f1f5f9;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #2563eb;
    --accent-gradient: #2563eb;
    --border-color: #cbd5e1;
    --hover-bg: #e2e8f0;
    --active-bg: #cbd5e1;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --glass-bg: #ffffff;
    --glass-border: #cbd5e1;
    --abstract-display: none;
}

[data-theme="classic-blue"] {
    --bg-color: #0a192f;
    --surface-color: #112240;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --accent-color: #64ffda;
    --accent-gradient: #64ffda;
    --border-color: #233554;
    --hover-bg: #233554;
    --active-bg: #112240;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --glass-bg: #0a192f;
    --glass-border: #233554;
    --abstract-display: none;
}

[data-theme="antifasih-glass"] {
    --bg-color: #0f0c29;
    --surface-color: rgba(0, 0, 0, 0.4);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-color: #ff007f;
    --accent-gradient: linear-gradient(135deg, #ff007f, #7928ca);
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(255, 255, 255, 0.1);
    --active-bg: rgba(255, 255, 255, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --abstract-display: block;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
    transition: background-color 0.3s, color 0.3s;
}

/* Abstract Background (only for antifasih-glass) */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #0f0c29, #302b63, #24243e);
    z-index: -2;
    display: var(--abstract-display);
}

.bg-shape {
    display: var(--abstract-display);
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: #ff007f;
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 600px;
    height: 600px;
    background: #7928ca;
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 400px;
    height: 400px;
    background: #00d2ff;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 40px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

.glass-container {
    display: flex;
    height: 94vh;
    width: 96vw;
    margin: 3vh 2vw;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px var(--shadow-color);
    overflow: hidden;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.glass-sidebar {
    width: 320px;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
    transition: background 0.3s, border-color 0.3s;
}

.sidebar-header {
    padding: 20px 20px 10px;
}

.sidebar-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.sidebar-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
}

.search-container {
    padding: 0 20px 10px;
}

.lecture-search {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

[data-theme="antifasih-light"] .lecture-search {
    background: rgba(0, 0, 0, 0.03);
}

.lecture-search:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.lecture-search::placeholder {
    color: var(--text-secondary);
}

.video-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px 20px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.video-list {
    list-style: none;
}

.video-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.video-item:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.video-item.active {
    background: var(--active-bg);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.video-number-badge {
    background: var(--accent-gradient);
    color: var(--bg-color);
    min-width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin-right: 16px;
}

.video-number-badge.completed {
    background: var(--success-color, #10b981);
    color: white !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.completed-check {
    margin-left: auto;
    color: var(--success-color, #10b981);
    font-size: 1.4rem;
    font-weight: bold;
    animation: scale-in 0.3s ease-out;
}

@keyframes scale-in {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

[data-theme="antifasih-dark"] .video-number-badge,
[data-theme="classic-blue"] .video-number-badge {
    color: #fff;
}

.video-title-text {
    font-weight: 500;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.loading-state {
    padding: 24px;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

.glass-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 30px 20px;
    overflow-y: auto;
}

.main-header {
    margin-bottom: 10px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.user-menu-container {
    position: relative;
    display: flex;
    align-items: center;
}

.user-dropdown-menu {
    position: absolute;
    top: 110%;
    right: 0;
    width: 250px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}

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

.dropdown-header {
    padding: 0.5rem 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.dropdown-item {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    width: 100%;
}

.dropdown-item:hover {
    background: var(--hover-bg);
}

.theme-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0.5rem;
    gap: 10px;
    margin-bottom: 0.5rem;
}
.theme-item label {
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.header-content {
    min-width: 0;
}

.gradient-text {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1.1;
    letter-spacing: -0.5px;
    background: var(--text-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="antifasih-glass"] .gradient-text {
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 300;
}

.glass-panel {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: background 0.3s, border-color 0.3s;
}

.player-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player {
    width: 100%;
    height: 100%;
    outline: none;
    display: none;
    border-radius: 20px;
    background: #000;
}

.video-player.active {
    display: block;
}

.placeholder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.placeholder-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.pulse-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.4;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.play-icon {
    width: 60px;
    height: 60px;
    color: white;
    z-index: 2;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}


.highlight-text {
    color: var(--accent-color);
    font-weight: 600;
}

/* Custom Video Controls */
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 20px 20px 15px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 10;
}

.custom-controls.controls-visible,
.custom-controls.active {
    opacity: 1;
    pointer-events: all;
}

.player-container.controls-hidden {
    cursor: none;
}

.placeholder-overlay.active ~ .custom-controls {
    display: none;
}

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.time-text {
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    color: #fff;
    min-width: 45px;
    text-align: center;
}

.seek-slider {
    -webkit-appearance: none;
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    transition: height 0.1s ease;
}

.seek-slider:hover {
    height: 8px;
}

.seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-color);
    transition: transform 0.1s ease;
}

.seek-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.controls-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.control-btn:hover {
    transform: scale(1.15);
    color: var(--accent-color);
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

.volume-slider,
.speed-slider {
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider {
    width: 80px;
}

.speed-slider {
    width: 60px;
}

.volume-slider::-webkit-slider-thumb,
.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: transform 0.1s;
}

.volume-slider::-webkit-slider-thumb:hover,
.speed-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--accent-color);
}

.video-player::-webkit-media-controls {
    display: none !important;
}

/* Custom Dropdown Styles (Theme & Speed) */
.theme-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 50;
}

.theme-selector label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.custom-dropdown {
    position: relative;
    display: inline-block;
    user-select: none;
}

.dropdown-selected {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 150px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.dropdown-selected::after {
    content: '▼';
    font-size: 0.6rem;
    margin-left: 10px;
    transition: transform 0.2s;
}

.custom-dropdown.open .dropdown-selected::after {
    transform: rotate(180deg);
}

.dropdown-selected:hover {
    border-color: var(--text-secondary);
}

.dropdown-options {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px var(--shadow-color);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 100;
}

.custom-dropdown.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-dropdown.dropup .dropdown-options {
    top: auto;
    bottom: 110%;
    transform: translateY(10px);
}

.custom-dropdown.dropup.open .dropdown-options {
    transform: translateY(0);
}

.dropdown-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}

.dropdown-option:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.dropdown-option.active {
    background: var(--active-bg);
    color: var(--text-primary);
    font-weight: bold;
}

/* In the player controls, we want the dropdown to be styled a bit differently */
.speed-control .dropdown-selected {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    min-width: 80px;
    padding: 6px 12px;
}

.speed-control .dropdown-selected:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.speed-control .dropdown-options {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.speed-control .dropdown-option {
    color: rgba(255, 255, 255, 0.8);
}

.speed-control .dropdown-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.speed-control .dropdown-option.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}


.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1; visibility: visible;
}
.modal-content {
    background: var(--surface-color);
    padding: 40px; border-radius: 24px;
    max-width: 450px; width: 90%;
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px var(--shadow-color);
}
.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}
.modal-title {
    font-size: 1.8rem; font-weight: 800; color: var(--text-primary);
    margin-bottom: 15px;
}
.modal-desc {
    color: var(--text-secondary); font-size: 1.1rem; line-height: 1.6;
    margin-bottom: 30px;
}
.modal-desc strong {
    color: var(--text-primary); display: inline-block; margin-top: 5px;
}
.time-badge {
    background: var(--active-bg);
    padding: 4px 10px; border-radius: 6px; font-variant-numeric: tabular-nums;
    font-weight: bold;
}
.modal-actions {
    display: flex; gap: 15px; justify-content: center;
}
.modal-btn {
    padding: 12px 24px; border-radius: 12px; font-size: 1rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all 0.2s ease; border: none; outline: none; flex: 1;
}
.btn-secondary {
    background: transparent; color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--hover-bg); color: var(--text-primary);
}
.btn-primary {
    background: var(--accent-gradient); color: #fff;
    box-shadow: 0 4px 15px var(--shadow-color);
}
.btn-primary:hover {
    transform: translateY(-2px); box-shadow: 0 6px 20px var(--shadow-color);
}

/* Action Feedback Overlay */
.action-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 20px 30px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
    z-index: 20;
    min-width: 100px;
}

.action-feedback.active {
    animation: actionFeedbackAnim 0.6s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

@keyframes actionFeedbackAnim {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

.action-feedback-icon svg {
    width: 48px;
    height: 48px;
    fill: currentColor;
}

.action-feedback-text {
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1024px) {
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }

    .glass-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        margin: 0;
        width: 100vw;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .glass-main {
        order: 1;
        padding: 30px 20px;
        overflow-y: visible;
        flex: none;
    }

    .glass-sidebar {
        order: 2;
        width: 100%;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }

    .video-list-container {
        overflow-y: visible;
    }

    .header-top {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .gradient-text {
        font-size: 2.2rem;
    }

    .sidebar-header h1 {
        font-size: 2rem;
    }

    .pulse-ring {
        width: 80px;
        height: 80px;
    }

    .play-icon {
        width: 40px;
        height: 40px;
    }
}

/* Admin Panel Enhancements */
.admin-panel {
    max-width: 1000px !important;
    width: 95% !important;
    height: 92vh !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 1.5rem 2rem !important;
    background: var(--surface-color) !important;
    border: 1px solid var(--glass-border) !important;
    overflow: hidden !important;
}

.admin-tab-content {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

#sys-config, #shared-files-mgmt {
    overflow-y: auto;
    padding-right: 10px;
}

.admin-tab-content.active {
    display: flex;
}

.table-responsive {
    flex: 1;
    overflow-y: auto;
    padding-right: 12px;
    margin-top: 1rem;
    min-height: 0;
}

.table-responsive::-webkit-scrollbar {
    width: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: 16px;
    width: fit-content;
}

.admin-tab {
    padding: 10px 24px !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
}

.admin-tab.active {
    background: var(--accent-gradient) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.admin-section-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 1.2rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
}

.admin-section-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-section-card h3::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 4px;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.admin-form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 4px;
}

.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.users-table thead th {
    position: sticky;
    top: -8px; /* Offset for border-spacing if needed, or just 0 */
    z-index: 10;
    background: var(--surface-color);
    padding: 12px 20px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.users-table td {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

.users-table tr td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.users-table tr td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }

.users-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active { background: rgba(77, 255, 77, 0.1); color: #4dff4d; }
.status-blocked { background: rgba(255, 77, 77, 0.1); color: #ff4d4d; }

.action-btn-group {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
}

/* Profile Avatar */
.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-color);
}

.large-avatar {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
}

.admin-tab-content::-webkit-scrollbar {
    width: 6px;
}

.admin-tab-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

/* Close X Button */
.close-x {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-x:hover {
    background: rgba(255, 77, 77, 0.2);
    border-color: rgba(255, 77, 77, 0.4);
    color: #ff4d4d;
    transform: rotate(90deg);
}

/* Directory Browser */
.browse-modal {
    z-index: 1100;
}

.browse-container {
    max-width: 600px !important;
}

.path-bar {
    background: rgba(0,0,0,0.3);
    padding: 10px 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    white-space: nowrap;
}

.dir-list {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.dir-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.dir-item:last-child { border-bottom: none; }

.dir-item:hover {
    background: rgba(255,255,255,0.05);
}

.dir-item svg {
    width: 20px;
    height: 20px;
    color: #ffd700;
}

.dir-item.parent-dir svg {
    color: var(--text-muted);
}
