/* VAP Theme CSS (HTML5/CSS3) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* GLOBAL OVERRIDES FOR DROPDOWNS, INPUTS AND TEXTAREAS */
select {
    background-color: #000000 !important;
    color: #ffffff !important;
}

select option {
    background-color: #000000 !important;
    color: #ffffff !important;
}

input:not([type="checkbox"]):not([type="radio"]), 
textarea,
.form-control {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Ensure placeholder visibility on dark background */
input::placeholder, 
textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Force the calendar icon to cover the entire input area so clicking anywhere opens the picker */
input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    color: transparent;
    background: transparent;
    cursor: pointer;
    z-index: 10;
}

/* Ensure the container is relative so the icon positions correctly */
.fd-create-row, .fd-ai-row {
    position: relative;
}

input[type="datetime-local"] {
    color-scheme: dark;
    position: relative;
    cursor: pointer;
}

:root {
    --bg: #320665;
    --ribbon: rgba(166, 99, 204, 0.78); /* #A663CC @ 78% */
    --ink: #171123;
    --btn: #FBFBFB;
    --glow: #320665;
    --glass: rgba(166, 99, 204, 0.28);
    --glass-strong: rgba(166, 99, 204, 0.42);
    --border: rgba(251, 251, 251, 0.28);
    --border-strong: rgba(251, 251, 251, 0.55);
}

html, body {
    height: 100vh !important;
    width: 100vw !important;
    overflow: hidden !important;
    margin: 0;
    padding: 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

body {
    background: var(--bg);
    min-height: 100vh;
    position: relative;
    color: var(--ink);
}

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

.main-content {
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
}

/* Home and Auth pages should not show scrollbars (already handled by global html, body rules) */

/* Full-screen fluid background canvas */
#fluid-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    pointer-events: none;
    display: block;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.85) 0%, rgba(111, 45, 189, 0.75) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3000;
    border-bottom: 1px solid rgba(251, 251, 251, 0.25);
}

.header-dept {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 800;
    color: rgba(251, 251, 251, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.header-inner {
    width: 100%;
    margin: 0;
    padding: 0 24px;
}

.header-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 10px 0;
    height: 80px;
}

/* Prevent content from hiding under fixed header */
body { 
    padding-top: 80px;
    padding-bottom: 30px; /* Base breathing room */
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-self: start;
}

.brand-logo {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.brand-logo img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.brand-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text {
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #ff3b30;
    text-transform: uppercase;
}



.header-nav-center {
    justify-self: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    text-decoration: none;
    color: rgba(251, 251, 251, 0.95);
    font-weight: 800;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 4px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(251, 251, 251, 1);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

nav ul li a.active {
    background: linear-gradient(135deg, rgba(251, 251, 251, 0.25) 0%, rgba(251, 251, 251, 0.15) 100%);
    color: rgba(251, 251, 251, 1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.btn {
    padding: 10px 20px;
    border-radius: 30px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* VAP buttons - Liquid Glassy Style */
.vap-btn {
    background: linear-gradient(135deg, rgba(251, 251, 251, 0.95) 0%, rgba(251, 251, 251, 0.85) 100%);
    color: var(--ink);
    border: 1px solid rgba(251, 251, 251, 0.6);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
}

.vap-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.vap-btn:hover::before {
    left: 100%;
}

.vap-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.vap-btn.alt {
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.2) 0%, rgba(111, 45, 189, 0.15) 100%);
    color: rgba(251, 251, 251, 0.95);
    border: 2px solid rgba(251, 251, 251, 0.4);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.vap-btn.alt:hover {
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.3) 0%, rgba(111, 45, 189, 0.25) 100%);
    border-color: rgba(251, 251, 251, 0.5);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.vap-btn.warn {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.25) 0%, rgba(255, 100, 0, 0.2) 100%);
    border: 2px solid rgba(255, 140, 0, 0.5);
    color: rgba(251, 251, 251, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 16px rgba(255, 140, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.9) 0%, rgba(200, 40, 30, 0.85) 100%);
    color: rgba(251, 251, 251, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 4px 16px rgba(255, 59, 48, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
/* Ensure the button transitions smoothly when opacity changes */
.vap-btn {
    transition: opacity 0.3s ease, transform 0.2s ease !important;
    will-change: opacity;
}

/* This class ensures the area around the button stays 'active' 
   even when the button itself is invisible, preventing the blink loop */
.actions {
    min-height: 50px; /* Adjust based on your button height */
    display: flex;
    align-items: center;
    position: relative;
}

/* Ensure the dashboard doesn't overlap with the home page content */
/* Ensure only the active page is shown and override any hidden styles */
.page {
    display: none !important;
}

.page.active {
    display: block !important;
    animation: fadeIn 0.5s ease forwards;
}

/* Specific fix: ensure dashboards inside an active page are visible */
 
.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.bubble:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 18s;
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.1) 0%, rgba(58, 12, 163, 0.1) 100%);
}

.bubble:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 70%;
    animation-delay: 4s;
    animation-duration: 22s;
    background: linear-gradient(135deg, rgba(255, 186, 8, 0.1) 0%, rgba(247, 37, 133, 0.1) 100%);
}

.bubble:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 70%;
    left: 15%;
    animation-delay: 6s;
    animation-duration: 17s;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(76, 201, 240, 0.1) 100%);
}

.bubble:nth-child(5) {
    width: 90px;
    height: 90px;
    top: 30%;
    left: 50%;
    animation-delay: 8s;
    animation-duration: 19s;
    background: linear-gradient(135deg, rgba(58, 12, 163, 0.1) 0%, rgba(255, 186, 8, 0.1) 100%);
}

.bubble:nth-child(6) {
    width: 70px;
    height: 70px;
    top: 20%;
    left: 80%;
    animation-delay: 10s;
    animation-duration: 21s;
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.1) 0%, rgba(67, 97, 238, 0.1) 100%);
}

.bubble:nth-child(7) {
    width: 110px;
    height: 110px;
    top: 80%;
    left: 40%;
    animation-delay: 12s;
    animation-duration: 16s;
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.1) 0%, rgba(255, 186, 8, 0.1) 100%);
}

.bubble:nth-child(8) {
    width: 85px;
    height: 85px;
    top: 50%;
    left: 25%;
    animation-delay: 14s;
    animation-duration: 23s;
    background: linear-gradient(135deg, rgba(58, 12, 163, 0.1) 0%, rgba(247, 37, 133, 0.1) 100%);
}

@keyframes floatBubble {

    0%,
    100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.5;
    }

    25% {
        transform: translateY(-40px) translateX(20px) scale(1.05);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-80px) translateX(-20px) scale(1.1);
        opacity: 0.6;
    }

    75% {
        transform: translateY(-40px) translateX(-30px) scale(1.05);
        opacity: 0.8;
    }
}

/* Main Content Styles */
.main-content {
    padding: 40px 0;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
    height: 100%;
}

/* Disable scroll for auth pages */
#faculty-page.active,
#student-page.active {
    height: calc(100vh - 80px); /* Adjust for header */
    overflow: hidden;
}

/* HOME */
.home-hero {
    min-height: calc(100vh - 120px);
    padding: 60px 0 60px; /* Increased top padding */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centered content */
    align-items: center;    /* Centered content */
    gap: 32px;
}

.home-hero-left {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
}

.dept {
    color: rgba(251, 251, 251, 0.85);
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.dept-title {
    font-size: 14px;
}

.dept-subtitle {
    font-size: 10px;
    opacity: 0.9;
    margin-top: 6px;
}

.home-title {
    text-align: center;
}

.home-title-sub {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(251, 251, 251, 0.95);
    text-transform: uppercase;
}

.home-title-main {
    margin-top: 10px;
    font-size: 48px; /* Slightly larger */
    font-weight: 900;
    letter-spacing: 2px;
    color: rgba(251, 251, 251, 0.95);
    text-transform: uppercase;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    text-align: center;
}

.home-entrance-grid {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.entrance-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 32px;
    width: 320px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.entrance-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.entrance-icon {
    font-size: 32px;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.entrance-text {
    display: flex;
    flex-direction: column;
}

.entrance-title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.entrance-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.admin-entry {
    margin-top: 40px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.admin-entry:hover {
    opacity: 1;
}

.admin-entry a {
    text-decoration: none;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* VAP reveal (cinematic extrusion) */
.vap-reveal {
    display: flex;
    justify-content: center;
    gap: 14px;
    perspective: 1400px;
    margin: 10px 0 2px;
}

.vap-letter {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--bg); /* start invisible (matches background) */
    text-transform: uppercase;
    transform: translateZ(-160px) translateY(18px) scale(0.98);
    filter: blur(0.6px);
    position: relative;
    text-shadow: none;
    will-change: transform, filter, color, text-shadow;
}

.vap-reveal.is-on .vap-letter {
    animation: vapExtrude 1400ms cubic-bezier(0.14, 0.86, 0.2, 1) forwards;
}

.vap-letter::after {
    content: attr(data-letter);
    position: absolute;
    inset: 0;
    color: rgba(251, 251, 251, 0.22);
    transform: translateZ(-1px);
    filter: blur(10px);
    opacity: 0;
}

.vap-reveal.is-on .vap-letter::after {
    animation: vapGlow 1400ms cubic-bezier(0.14, 0.86, 0.2, 1) forwards;
}

@keyframes vapExtrude {
    0% {
        color: var(--bg);
        transform: translateZ(-160px) translateY(18px) scale(0.98);
        filter: blur(0.8px);
        text-shadow: none;
    }
    40% {
        transform: translateZ(-40px) translateY(10px) scale(1.03);
        filter: blur(0.35px);
        color: rgba(111, 45, 189, 0.96);
    }
    62% {
        transform: translateZ(16px) translateY(-3px) scale(1.02);
        filter: blur(0px);
    }
    74% {
        transform: translateZ(6px) translateY(1px) scale(1.01);
    }
    100% {
        color: rgba(251, 251, 251, 0.92);
        transform: translateZ(0px) translateY(0px) scale(1);
        filter: blur(0px);
        text-shadow:
            0 0 0.5px rgba(200, 200, 210, 0.9), /* subtle silver stroke feel */
            0 0 18px rgba(111, 45, 189, 0.55),
            0 0 44px rgba(111, 45, 189, 0.25);
    }
}

@keyframes vapGlow {
    0%, 45% { opacity: 0; }
    70% { opacity: 0.25; }
    100% { opacity: 0.45; }
}

/* Portal shells */
.portal-shell {
    padding: 20px 0 40px;
    height: 100%;
    width: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.05) 0%, rgba(111, 45, 189, 0.03) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.portal-shell::-webkit-scrollbar {
    display: none;
}

.portal-title {
    color: rgba(251, 251, 251, 0.90);
    letter-spacing: 2px;
    font-weight: 900;
}

/* Glass card - Liquid Glassy Style */
.glass {
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.35) 0%, rgba(111, 45, 189, 0.25) 100%);
    border: 1px solid rgba(251, 251, 251, 0.3);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.auth-card {
    width: min(560px, 92vw);
    padding: 22px;
    border-radius: 14px;
}

.auth-card-title {
    color: rgba(251, 251, 251, 0.95);
    font-weight: 900;
    text-align: center;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.auth-form .field {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.auth-form label {
    color: rgba(251, 251, 251, 0.90);
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 12px;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid rgba(251, 251, 251, 0.35);
    outline: none;
    background: #000000;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    color: #ffffff;
    transition: all 200ms ease;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-form select option {
    background-color: #000000;
    color: #ffffff;
}

.auth-form input::placeholder {
    color: rgba(251, 251, 251, 0.58);
}

.auth-form input:focus,
.auth-form select:focus {
    border-color: rgba(166, 99, 204, 0.95);
    background: linear-gradient(135deg, rgba(23, 17, 35, 0.6) 0%, rgba(23, 17, 35, 0.4) 100%);
    box-shadow: 
        0 0 0 4px rgba(111, 45, 189, 0.28), 
        0 0 26px rgba(166, 99, 204, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.linkish {
    background: transparent;
    border: none;
    color: rgba(251, 251, 251, 0.85);
    font-weight: 700;
    cursor: pointer;
    padding: 8px 0 0;
    text-align: left;
}

.actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.actions.two {
    justify-content: space-between;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 6px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(251, 251, 251, 0.25);
    border: 1px solid rgba(251, 251, 251, 0.25);
}

.step-dot.active {
    background: rgba(251, 251, 251, 0.85);
}

.step-panel { display: none; }
.step-panel.active { display: block; }

.checkline {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
    color: rgba(251, 251, 251, 0.88);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
}

.checkline input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* 3D horizontal flip */
.auth-3d {
    perspective: 1400px;
}

.auth-3d-inner {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 900ms cubic-bezier(0.14, 0.86, 0.2, 1);
}

.auth-3d.is-flipped .auth-3d-inner,
.auth-3d-inner.is-flipped {
    transform: rotateY(180deg);
}

.auth-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.auth-back {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
}

/* Hide old (not used now) */
.background-animation { display: none !important; }

.teacher-access {
    padding: 30px;
    margin-bottom: 30px;
    animation: fadeInUp 1.4s ease;
}

.teacher-access h2 {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 25px;
}

.access-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.learning-explanation {
    padding: 30px;
    margin-bottom: 30px;
    animation: fadeInUp 1.6s ease;
}

.learning-explanation h2 {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 25px;
}

.explanation-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.explanation-animation {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.explanation-text {
    flex: 1;
}

.explanation-text p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.6;
}

.explanation-step {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Teacher and Student Page Styles */
.form-container {
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
}

.form-title {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 25px;
    font-size: 26px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e6e6e6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

/* Teacher Dashboard Styles */
.dashboard-container {
    padding: 30px;
    margin-bottom: 30px;
}

.dashboard-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-card {
    background: var(--light);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.input-with-eye { position: relative; display: flex; align-items: center; }
.input-with-eye input { flex: 1; }
.eye-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: rgba(251,251,251,0.9); font-size: 18px; cursor: pointer; }

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-card i {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary);
}

.dashboard-card h3 {
    font-size: 20px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.dashboard-card p {
    color: var(--dark);
    font-size: 14px;
}

/* Quiz Creation Styles */
.quiz-form-container {
    padding: 30px;
    margin-bottom: 30px;
}

.question-container {
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f9f9f9;
}

.option-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.option-row input[type="text"] {
    flex: 1;
    margin-right: 10px;
}

.option-row input[type="radio"] {
    margin-right: 10px;
}

/* Quiz Management Styles */
.quiz-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.quiz-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.quiz-item:hover {
    transform: translateY(-5px);
}

.quiz-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

/* Scores Table Styles */
.scores-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.scores-table th,
.scores-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e6e6e6;
}

.scores-table th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
}

.scores-table tr:last-child td {
    border-bottom: none;
}

.scores-table tr:hover {
    background-color: #f5f5f5;
}

/* Student Quiz Taking Styles */
.quiz-taking-container {
    padding: 30px;
    margin-bottom: 30px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e6e6e6;
}

.quiz-header h2 {
    color: var(--secondary);
    margin: 0;
}

.quiz-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.timer-container {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.timer-container i {
    margin-right: 8px;
    color: var(--primary);
}

.question-counter {
    font-size: 16px;
    color: var(--dark);
}

.question-display {
    margin-bottom: 25px;
}

.question-display h3 {
    font-size: 20px;
    color: var(--secondary);
    margin-bottom: 20px;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    display: flex;
    align-items: center;
}

.option input[type="radio"] {
    margin-right: 10px;
}

.option label {
    font-size: 16px;
    cursor: pointer;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Quiz Results Styles */
/* Ensure all student content containers are scrollable and have consistent background */
.quiz-results-container, 
.quiz-taking-container, 
.dashboard-container,
.form-container {
    height: calc(100vh - 160px); /* Explicit height with enough space for header/footer */
    overflow-y: auto;           /* Enable vertical scrolling */
    padding: 30px;
    padding-bottom: 80px;       /* Extra space at bottom for readability */
    background: linear-gradient(135deg, rgba(23, 17, 35, 0.8) 0%, rgba(23, 17, 35, 0.6) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(251, 251, 251, 0.2);
    border-radius: 14px;
    margin-top: 10px;
}

/* Custom scrollbar for all student containers */
.quiz-results-container::-webkit-scrollbar,
.quiz-taking-container::-webkit-scrollbar,
.dashboard-container::-webkit-scrollbar,
.form-container::-webkit-scrollbar {
    width: 6px;
}
.quiz-results-container::-webkit-scrollbar-track,
.quiz-taking-container::-webkit-scrollbar-track,
.dashboard-container::-webkit-scrollbar-track,
.form-container::-webkit-scrollbar-track {
    background: rgba(251, 251, 251, 0.05);
    border-radius: 10px;
}
.quiz-results-container::-webkit-scrollbar-thumb,
.quiz-taking-container::-webkit-scrollbar-thumb,
.dashboard-container::-webkit-scrollbar-thumb,
.form-container::-webkit-scrollbar-thumb {
    background: rgba(166, 99, 204, 0.5);
    border-radius: 10px;
}
.quiz-results-container::-webkit-scrollbar-thumb:hover,
.quiz-taking-container::-webkit-scrollbar-thumb:hover,
.dashboard-container::-webkit-scrollbar-thumb:hover,
.form-container::-webkit-scrollbar-thumb:hover {
    background: rgba(166, 99, 204, 0.8);
}

.results-summary {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e6e6e6;
}

.results-summary h3 {
    color: var(--secondary);
    margin-bottom: 15px;
}

.score-display {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

#result-message {
    font-size: 18px;
    color: var(--dark);
}

.results-details {
    margin-bottom: 30px;
}

.results-details h3 {
    color: var(--secondary);
    margin-bottom: 20px;
}

.review-question {
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 8px;
    background: #f9f9f9;
}

.question-status.correct {
    border-left: 4px solid var(--success);
}

.question-status.incorrect {
    border-left: 4px solid var(--danger);
}

.question-status h4 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.status {
    font-weight: 600;
    margin-bottom: 10px;
}

.question-status.correct .status {
    color: var(--success);
}

.question-status.incorrect .status {
    color: var(--danger);
}

.question-explanation {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.question-explanation p {
    margin: 0;
    color: var(--dark);
}

/* Attempt history styles */
.attempt-item {
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

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

.attempt-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.download-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.download-btn:hover {
    background: #3aa5d5;
}

/* About Page Styles */
.team-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.team-member {
    padding: 25px;
    text-align: center;
    transition: transform 0.3s;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
}

.team-member h3 {
    font-size: 22px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.team-member p {
    color: var(--dark);
    margin-bottom: 15px;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 20000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: #4CAF50;
}

.toast.error {
    background-color: #f44336;
}

/* Animation for the learning process */
.learning-visual {
    width: 300px;
    height: 200px;
    position: relative;
}

.learning-visual-item {
    position: absolute;
    transition: all 0.5s ease;
    opacity: 0;
    animation: learningVisual 9s infinite;
}

.learning-visual-item:nth-child(1) {
    animation-delay: 0s;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.learning-visual-item:nth-child(2) {
    animation-delay: 3s;
    top: 30%;
    left: 30%;
    transform: translate(-30%, -30%);
}

.learning-visual-item:nth-child(3) {
    animation-delay: 6s;
    top: 70%;
    left: 70%;
    transform: translate(-70%, -70%);
}

@keyframes learningVisual {

    0%,
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    33%,
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        height: auto;
        padding: 12px 0;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 12px;
    }

    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px;
    }

    .auth-buttons {
        margin-top: 15px;
        flex-direction: column;
        gap: 10px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .access-options {
        flex-direction: column;
        align-items: center;
    }

    .explanation-content {
        flex-direction: column;
    }

    .learning-visual {
        width: 100%;
        margin-bottom: 20px;
    }

    .form-actions {
        flex-direction: column;
        gap: 15px;
    }

    .dashboard-options {
        grid-template-columns: 1fr;
    }

    .quiz-actions {
        flex-direction: column;
        gap: 10px;
    }

    .scores-table {
        font-size: 14px;
    }

    .scores-table th,
    .scores-table td {
        padding: 10px;
    }

    .quiz-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .quiz-info {
        flex-direction: column;
        gap: 10px;
    }

    .quiz-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .quiz-navigation button {
        width: 100%;
    }

    .attempt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .attempt-details {
        grid-template-columns: 1fr;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Generation Loading Overlay */
#generation-loading:not([hidden]) {
    position: fixed;
    inset: 0;
    background: rgba(23, 17, 35, 0.85);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #FBFBFB;
    text-align: center;
}
 
.loading-gif {
    width: 280px;
    max-width: 80vw;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(166, 99, 204, 0.4);
    margin-bottom: 24px;
}
 
.loading-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
 
/* ========== Faculty Dashboard ========== */

.fd-dashboard {
    min-height: auto; /* Remove forced height that triggers scroll */
    padding: 20px 0;
}

.fd-layout {
    display: flex;
    max-width: none;
    margin: 0;
    padding: 0 20px 0 160px; /* Added left padding for fixed sidebar */
    gap: 24px;
}

.fd-sidebar {
    width: 140px;
    min-width: 140px;
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.85) 0%, rgba(111, 45, 189, 0.75) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(251, 251, 251, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition: width 0.25s ease, min-width 0.25s ease;
    position: fixed; /* Changed from sticky to fixed */
    top: 100px;
    left: 20px;
    z-index: 1000;
}

.fd-sidebar.collapsed {
    width: 56px;
    min-width: 56px;
}

.fd-sidebar.collapsed .fd-nav,
.fd-sidebar.collapsed .fd-account-wrap {
    display: none;
}

.fd-sidebar.collapsed .fd-menu-btn {
    text-align: center;
    padding: 10px 0;
}

.fd-sidebar.collapsed .fd-menu-btn span {
    font-size: 0;
}

.fd-sidebar.collapsed .fd-menu-btn::after {
    content: attr(data-icon);
    font-size: 1.2rem;
    display: block;
}


.fd-menu-btn {
    background: linear-gradient(135deg, rgba(23, 17, 35, 0.6) 0%, rgba(23, 17, 35, 0.4) 100%);
    border: 1px solid rgba(251, 251, 251, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(251, 251, 251, 0.95);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.fd-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fd-nav-btn {
    background: linear-gradient(135deg, rgba(251, 251, 251, 0.9) 0%, rgba(251, 251, 251, 0.8) 100%);
    color: var(--ink);
    border: 2px solid rgba(23, 17, 35, 0.2);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    padding: 4px 8px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.fd-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.4s;
}

.fd-nav-btn:hover::before {
    left: 100%;
}

.fd-nav-btn:hover {
    background: linear-gradient(135deg, rgba(251, 251, 251, 1) 0%, rgba(251, 251, 251, 0.95) 100%);
    color: var(--ink);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.fd-nav-btn.active {
    background: linear-gradient(135deg, rgba(166,99,204,0.95) 0%, rgba(111,45,189,0.85) 100%);
    color: #ffffff;
    border-color: rgba(166,99,204,0.95);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.fd-account-wrap {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(251, 251, 251, 0.15);
}

.fd-account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fd-main {
    flex: 1;
    min-width: 0;
    height: calc(100vh - 120px); /* Fill the viewport height minus spacing */
    overflow-y: auto;           /* Enable vertical scrolling */
    padding-right: 10px;        /* Space for scrollbar */
    padding-bottom: 80px;       /* Added padding at bottom for buttons visibility */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.fd-main::-webkit-scrollbar {
    width: 6px;
}
.fd-main::-webkit-scrollbar-track {
    background: rgba(251, 251, 251, 0.05);
    border-radius: 10px;
}
.fd-main::-webkit-scrollbar-thumb {
    background: rgba(166, 99, 204, 0.5);
    border-radius: 10px;
}
.fd-main::-webkit-scrollbar-thumb:hover {
    background: rgba(166, 99, 204, 0.8);
}

.fd-view {
    display: none;
    animation: fadeIn 0.35s ease;
}

.fd-view.active {
    display: block;
}

.fd-title {
    color: rgba(251, 251, 251, 0.95);
    font-size: 1.75rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fd-welcome-msg, .fd-welcome-vap, .fd-welcome-tagline {
    color: rgba(251, 251, 251, 0.9);
    text-align: center;
    margin: 8px 0;
}

.fd-welcome-vap-letters {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.5em;
    color: rgba(251, 251, 251, 0.95);
    text-align: center;
    margin: 16px 0;
}

.fd-create-form.glass,
.fd-ai-form.glass,
.fd-account-form.glass,
.fd-manual-meta.glass {
    padding: 24px;
    border-radius: 14px;
    border: 1px solid rgba(251, 251, 251, 0.3);
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.35) 0%, rgba(111, 45, 189, 0.25) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    margin-bottom: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.fd-create-row, .fd-ai-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.fd-create-row label, .fd-ai-row label {
    color: rgba(251, 251, 251, 0.9);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

.fd-create-row input, .fd-create-row select,
.fd-ai-row input, .fd-ai-row select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid rgba(251, 251, 251, 0.4);
    background: #000000;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    color: #ffffff;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 200ms ease;
}

.fd-create-row select option, .fd-ai-row select option {
    background-color: #000000;
    color: #ffffff;
}

.fd-create-row input:focus, .fd-create-row select:focus,
.fd-ai-row input:focus, .fd-ai-row select:focus {
    border-color: rgba(166, 99, 204, 0.95);
    background: linear-gradient(135deg, rgba(23, 17, 35, 0.6) 0%, rgba(23, 17, 35, 0.4) 100%);
    box-shadow: 
        0 0 0 4px rgba(111, 45, 189, 0.28), 
        0 0 26px rgba(166, 99, 204, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.fd-create-actions, .fd-ai-actions {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.fd-manual-questions {
    margin: 20px 0;
}

.fd-manual-q-block {
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.35) 0%, rgba(111, 45, 189, 0.25) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(251, 251, 251, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.fd-manual-q-block h3 {
    color: rgba(251, 251, 251, 0.95);
    font-size: 1rem;
    margin-bottom: 12px;
}

.fd-manual-options {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fd-manual-options label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    color: rgba(251, 251, 251, 0.9);
    width: 100%;
}

.fd-manual-options label textarea,
.fd-view .field textarea {
    flex: 1;
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid rgba(251, 251, 251, 0.4);
    background: #000000;
    backdrop-filter: blur(10px);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    resize: none;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}

.fd-manual-options label textarea:focus,
.fd-view .field textarea:focus {
    border-color: rgba(166, 99, 204, 0.95);
    outline: none;
    box-shadow: 0 0 0 4px rgba(111, 45, 189, 0.2);
}

#fd-submit-assessment {
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.9) 0%, rgba(111, 45, 189, 0.8) 100%);
    color: white;
    border-color: rgba(251, 251, 251, 0.4);
    font-weight: 700;
}

#fd-submit-assessment:hover {
    background: linear-gradient(135deg, rgba(166, 99, 204, 1) 0%, rgba(111, 45, 189, 0.9) 100%);
    box-shadow: 0 12px 32px rgba(166, 99, 204, 0.4);
}

.fd-manual-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
    padding-bottom: 80px; /* Increased bottom padding */
}

.fd-ai-syllabus label {
    display: block;
    color: rgba(251, 251, 251, 0.9);
    font-weight: 700;
    margin-bottom: 8px;
}

.fd-ai-syllabus textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid rgba(251, 251, 251, 0.4);
    background: #000000;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    color: #ffffff;
    resize: vertical;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 200ms ease;
}

.fd-ai-syllabus textarea:focus {
    border-color: rgba(166, 99, 204, 0.95);
    background: linear-gradient(135deg, rgba(23, 17, 35, 0.6) 0%, rgba(23, 17, 35, 0.4) 100%);
    box-shadow: 
        0 0 0 4px rgba(111, 45, 189, 0.28), 
        0 0 26px rgba(166, 99, 204, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.fd-storage-warning {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.25) 0%, rgba(255, 100, 0, 0.2) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(255, 140, 0, 0.5);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 
        0 8px 32px rgba(255, 140, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.fd-storage-warning.error {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.25) 0%, rgba(200, 40, 30, 0.2) 100%);
    border-color: rgba(255, 59, 48, 0.6);
    box-shadow: 
        0 8px 32px rgba(255, 59, 48, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.fd-storage-warning strong {
    color: rgba(251, 251, 251, 0.95);
    font-size: 1rem;
    display: block;
    margin-bottom: 8px;
}

.fd-storage-warning p {
    color: rgba(251, 251, 251, 0.85);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.fd-manage-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.fd-manage-card {
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.35) 0%, rgba(111, 45, 189, 0.25) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(251, 251, 251, 0.3);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.fd-manage-card h3 {
    color: rgba(251, 251, 251, 0.95);
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.fd-manage-card .meta {
    color: rgba(251, 251, 251, 0.75);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.fd-manage-card .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fd-manage-card .btn {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
}

.fd-score-form.glass {
    padding: 20px;
    margin-bottom: 20px;
}

.fd-score-form label {
    color: rgba(251, 251, 251, 0.9);
    font-weight: 700;
    margin-right: 12px;
}

.fd-score-form select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid rgba(251, 251, 251, 0.4);
    background: #000000;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    color: #ffffff;
    min-width: 280px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 200ms ease;
}

.fd-score-form select option {
    background-color: #000000;
    color: #ffffff;
}

.fd-score-form select:focus {
    border-color: rgba(166, 99, 204, 0.95);
    background: linear-gradient(135deg, rgba(23, 17, 35, 0.6) 0%, rgba(23, 17, 35, 0.4) 100%);
    box-shadow: 
        0 0 0 4px rgba(111, 45, 189, 0.28), 
        0 0 26px rgba(166, 99, 204, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.fd-score-table-wrap {
    margin-top: 20px;
}

.fd-score-table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.35) 0%, rgba(111, 45, 189, 0.25) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(251, 251, 251, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.fd-score-table th, .fd-score-table td {
    padding: 12px 16px;
    text-align: left;
    color: rgba(251, 251, 251, 0.95);
    border-bottom: 1px solid rgba(251, 251, 251, 0.15);
}

.fd-score-table th {
    background: rgba(111, 45, 189, 0.4);
    font-weight: 800;
}

/* Profile Area Styles */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(251, 251, 251, 0.2);
}

.profile-avatar-wrap {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--ribbon);
    background: rgba(251, 251, 251, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--ribbon);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.profile-avatar-wrap::after {
    content: '\f030'; /* fa-camera */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-avatar-wrap:hover::after {
    opacity: 1;
}

.profile-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    text-align: center;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(251, 251, 251, 0.95);
    margin-bottom: 4px;
}

.profile-role {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(251, 251, 251, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fd-account-form .fd-account-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.fd-account-form .fd-account-label,
.fd-account-form .fd-account-value {
    color: rgba(251, 251, 251, 0.9);
    font-weight: 700;
}

.fd-account-form input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid rgba(251, 251, 251, 0.4);
    background: #000000;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    color: #ffffff;
    flex: 1;
    min-width: 200px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 200ms ease;
}

.fd-account-form input:focus {
    border-color: rgba(166, 99, 204, 0.95);
    background: linear-gradient(135deg, rgba(23, 17, 35, 0.6) 0%, rgba(23, 17, 35, 0.4) 100%);
    box-shadow: 
        0 0 0 4px rgba(111, 45, 189, 0.28), 
        0 0 26px rgba(166, 99, 204, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.fd-account-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Exam Panel */
.qt-layout { display: flex; gap: 24px; }
.qt-main { flex: 1; min-width: 0; }
.qt-side { width: 320px; min-width: 300px; background: linear-gradient(135deg, rgba(23,17,35,0.6), rgba(23,17,35,0.4)); border: 1px solid rgba(251,251,251,0.2); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.qs-header { color: rgba(251,251,251,0.95); font-weight: 900; letter-spacing: 1px; text-align: center; }
.qs-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.qs-cell { display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 6px; font-weight: 800; color: #000; }
.qs-cell.attempted { background: #34c759; }
.qs-cell.visited { background: #ffd60a; }
.qs-cell.pending { background: #888; color: #fff; }
.qs-legend { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; color: rgba(251,251,251,0.9); }
.qs-badge { display: inline-block; padding: 6px 10px; border-radius: 6px; font-weight: 800; }
.qs-badge.qs-attempted { background: #34c759; color: #000; }
.qs-badge.qs-visited { background: #ffd60a; color: #000; }
.qs-badge.qs-pending { background: #888; color: #fff; }
.quiz-header { display: flex; justify-content: space-between; align-items: center; }
.quiz-header h2 { color: rgba(251,251,251,0.95); font-weight: 900; }
.quiz-info { display: flex; gap: 12px; align-items: center; }
.question-display { margin-top: 16px; }
.options-container .option-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 2px solid rgba(251,251,251,0.3); border-radius: 10px; margin-bottom: 10px; background: linear-gradient(135deg, rgba(23,17,35,0.5), rgba(23,17,35,0.3)); }
.quiz-navigation { display: flex; justify-content: space-between; margin-top: 16px; }

/* Segmented gauge */
.sd-gauge { width: 220px; height: 120px; display: block; margin: 0 auto; }
.sd-gauge .needle { transform-origin: 110px 110px; transition: transform 0.3s ease; }
.sd-accuracy { justify-items: center; }

/* Exam panel text colors */
#question-text { color: rgba(251,251,251,0.95); }
.options-container label { color: rgba(251,251,251,0.95); font-weight: 700; }
.quiz-info, .quiz-header h2, .quiz-header span { color: rgba(251,251,251,0.9); }

/* Quiz Results readability */
.quiz-results-container,
.quiz-results-container h2,
.quiz-results-container h3,
.quiz-results-container h4,
.quiz-results-container p,
.quiz-results-container em,
.quiz-results-container strong {
    color: rgba(251, 251, 251, 0.95);
}
#questions-review .review-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 12px 0;
}


/* Student Dashboard */
.sd-dashboard {
    min-height: auto; /* Remove forced height that triggers scroll */
    padding: 20px 0;
}
.sd-layout {
    display: block; /* Changed from grid to block for fixed sidebar layout */
    max-width: none;
    margin: 0;
    padding: 0 20px 0 160px; /* Added left padding for fixed sidebar */
}

.sd-sidebar {
    width: 140px;
    min-width: 140px;
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.85) 0%, rgba(111, 45, 189, 0.75) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(251, 251, 251, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition: width 0.25s ease, min-width 0.25s ease;
    position: fixed; /* Changed from sticky to fixed */
    top: 100px;
    left: 20px;
    z-index: 1000;
}

/* Clip shimmer and inner effects to the card bounds */
.auth-form, .auth-card { 
    overflow: hidden; 
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.auth-form::-webkit-scrollbar, .auth-card::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
/* Student Sidebar rules consolidated into fd-sidebar */

.sd-menu-btn {
    background: linear-gradient(135deg, rgba(23, 17, 35, 0.6) 0%, rgba(23, 17, 35, 0.4) 100%);
    border: 1px solid rgba(251, 251, 251, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(251, 251, 251, 0.95);
    padding: 14px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Center welcome screens beneath fixed header */
.fd-view.active[data-fd-view="welcome"] {
    min-height: calc(100vh - 200px); 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
}
.sd-view.active[data-sd-view="home"] {
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
}
.sd-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.sd-nav-btn {
    background: linear-gradient(135deg, rgba(251, 251, 251, 0.9) 0%, rgba(251, 251, 251, 0.8) 100%);
    color: var(--ink);
    border: 2px solid rgba(23, 17, 35, 0.2);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    padding: 6px 8px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}
.sd-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.4s;
}
.sd-nav-btn:hover {
    background: linear-gradient(135deg, rgba(251, 251, 251, 1) 0%, rgba(251, 251, 251, 0.95) 100%);
    color: var(--ink);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.sd-nav-btn:hover::before { left: 100%; }
.sd-nav-btn.active {
    background: linear-gradient(135deg, rgba(166,99,204,0.95) 0%, rgba(111,45,189,0.85) 100%);
    color: #ffffff;
    border-color: rgba(166,99,204,0.95);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.sd-account-wrap { 
    margin-top: 6px; 
    padding-top: 8px; 
    border-top: 1px solid rgba(251, 251, 251, 0.25); 
}
.sd-account-btn { display: flex; align-items: center; gap: 8px; }
.sd-main {
    flex: 1;                /* Takes remaining width */
    min-width: 0;           /* Allows shrinking */
    position: relative;
    z-index: 0;
    padding-top: 12px;
    height: calc(100vh - 120px); /* Fill the viewport height minus spacing */
    overflow-y: auto;           /* Enable vertical scrolling */
    padding-right: 10px;        /* Space for scrollbar */
}

/* Scrollbar for student main content area */
.sd-main::-webkit-scrollbar {
    width: 6px;
}
.sd-main::-webkit-scrollbar-track {
    background: rgba(251, 251, 251, 0.05);
    border-radius: 10px;
}
.sd-main::-webkit-scrollbar-thumb {
    background: rgba(166, 99, 204, 0.5);
    border-radius: 10px;
}
.sd-main::-webkit-scrollbar-thumb:hover {
    background: rgba(166, 99, 204, 0.8);
}
.sd-view { display: none; animation: fadeIn 0.35s ease; }
.sd-view.active { display: block; }
.sd-home-grid { display: grid; grid-template-columns: 1fr 420px; gap: 30px; align-items: start; padding-bottom: 60px; }
@media (max-width: 1100px) {
    .sd-home-grid { grid-template-columns: 1fr; }
    .sd-home-analysis { width: 100% !important; max-height: none !important; overflow-y: visible !important; }
}

.sd-home-analysis { 
    width: 420px; 
    padding: 24px; 
    padding-bottom: 40px;
    color: #ffffff !important; 
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 15, 25, 0.4);
    backdrop-filter: blur(20px);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    scrollbar-width: thin;
}

/* Custom scrollbar for analysis panel */
.sd-home-analysis::-webkit-scrollbar {
    width: 6px;
}
.sd-home-analysis::-webkit-scrollbar-track {
    background: rgba(251, 251, 251, 0.05);
    border-radius: 10px;
}
.sd-home-analysis::-webkit-scrollbar-thumb {
    background: rgba(166, 99, 204, 0.5);
    border-radius: 10px;
}
.sd-home-analysis::-webkit-scrollbar-thumb:hover {
    background: rgba(166, 99, 204, 0.8);
}

/* Removed internal scrollbar to fix double scrollbar issue */

.analysis-title { 
    font-size: 14px; 
    font-weight: 900; 
    letter-spacing: 2px; 
    color: #00f2fe; 
    margin-bottom: 24px; 
    display: flex;
    align-items: center;
    gap: 10px;
}

.sd-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px 10px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
}

.stat-value {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}

.sd-analysis-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.chart-subtitle {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    opacity: 0.5;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.sd-chart-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.sd-chart-container {
    width: 100%;
    height: 220px;
    position: relative;
}

.sd-suggestions-box {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 20px;
}

.sd-suggestions {
    font-size: 13px;
    line-height: 1.6;
}

.suggestion-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border-left: 3px solid #00f2fe;
}

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

.suggestion-text strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.sd-accuracy { display: grid; gap: 8px; justify-items: end; }
.sd-practice-form .fd-create-row { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 12px; }
.sd-practice-form .fd-create-actions { display: flex; justify-content: flex-end; margin-top: 16px; }

.btn.vap-btn.small {
    padding: 8px 14px;
    font-size: 12px;
}

/* Student quiz option item */
.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid rgba(251, 251, 251, 0.25);
    border-radius: 10px;
    background: rgba(23, 17, 35, 0.35);
    margin-bottom: 10px;
}

.form-control[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(251, 251, 251, 0.08);
}

.review-item {
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid rgba(251, 251, 251, 0.2);
    margin-bottom: 12px;
    background: rgba(23, 17, 35, 0.3);
}

.review-explanation {
    margin-top: 12px;
    padding: 12px;
    background: rgba(166, 99, 204, 0.1);
    border-left: 4px solid rgba(166, 99, 204, 0.8);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(251, 251, 251, 0.9);
}

/* Practice chat robot */
.chat-wrap {
    padding: 14px;
    border-radius: 14px;
    border: 2px solid rgba(251, 251, 251, 0.25);
    background: rgba(23, 17, 35, 0.35);
}

.chat-messages {
    max-height: 380px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    padding: 10px 12px;
    border-radius: 12px;
    max-width: 75%;
}
.chat-msg.bot {
    background: rgba(111, 45, 189, 0.3);
    border: 2px solid rgba(111, 45, 189, 0.45);
    color: rgba(251, 251, 251, 0.95);
    align-self: flex-start;
}
.chat-msg.user {
    background: rgba(251, 251, 251, 0.25);
    border: 2px solid rgba(251, 251, 251, 0.35);
    color: rgba(251, 251, 251, 0.95);
    align-self: flex-end;
}

.chat-input-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.analysis-panel {
    padding: 16px;
    border-radius: 14px;
    border: 2px solid rgba(251,251,251,0.25);
    background: rgba(23, 17, 35, 0.35);
    margin-bottom: 18px;
}

.prac-explanation-box {
    margin-top: 24px;
    padding: 20px;
    background: rgba(52, 199, 89, 0.08);
    border-left: 4px solid #34c759;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.6;
    animation: fadeIn 0.4s ease;
}

/* Flip card for shared assessments */
.flip-card {
    min-height: 220px;
    min-width: 300px;
    perspective: 1000px;
    position: relative;
    border-radius: 12px;
}
.flip-card-inner {
    position: relative;
    height: 100%;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}
.flip-card:hover .flip-card-inner {
    transform: rotateY(-180deg);
}
.flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border: 1px solid rgba(251, 251, 251, 0.30);
    border-radius: 12px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.35) 0%, rgba(111, 45, 189, 0.25) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    color: #ffffff;
}
.flip-back {
    transform: rotateY(180deg);
}
.faculty-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.faculty-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(251, 251, 251, 0.35);
    background: rgba(251, 251, 251, 0.2);
    object-fit: cover;
}
.code-gate {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
/* Ensure the dashboard fills the space and is visible when active */
.page.active#faculty-dashboard, 
.page.active#student-dashboard {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 10;
}

/* Fix for the blank screen: ensures main content is tall enough to see */
.main-content {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}
/* Hide dashboards by default (they will be shown only when the user is logged in) */
.fd-dashboard, .dashboard-container {
    display: none;
}
/* Code question styling - preserves formatting for any programming language */
.question-code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    margin: 1.2rem 0;
    overflow-x: hidden; /* No side scrolling as requested */
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap; /* Wrap long lines to avoid side scroll */
    word-wrap: break-word;
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
    border: 1px solid rgba(100, 100, 100, 0.3);
}

/* Optional: subtle line numbers (can be removed if you don't like them) */
.question-code-block {
    counter-reset: line;
}

.question-code-block code {
    display: block;
}

.question-code-block code span.line {
    counter-increment: line;
}

.question-code-block code span.line::before {
    content: counter(line);
    display: inline-block;
    width: 2.5em;
    margin-right: 1em;
    text-align: right;
    color: #858585;
    user-select: none;
}.normal-question {
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 1rem 0;
    color: #f0f0f0;
}
/* Loading screen for AI generation (paper + pencil style) */
.generation-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(50, 6, 101, 0.92); /* your dark purple background with opacity */
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    gap: 1.8rem;
}

.generation-loading.active {
    display: flex;
}

.loading-gif {
    width: 160px;          /* you can make it bigger or smaller */
    height: auto;
    border-radius: 16px;
    box-shadow: none;
    background: transparent;
}

.loading-text {
    font-weight: 600;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.generation-loading small {
    opacity: 0.8;
    font-size: 1rem;
    max-width: 300px;
    text-align: center;
}
.fd-ai-generated {
    margin-top: 32px;
    width: 100%;
    max-width: 100%;
}

.fd-ai-generated h2 {
    color: rgba(251, 251, 251, 0.95);
    font-size: 1.5rem;
    margin-bottom: 24px;
    text-align: center;
    text-transform: uppercase;
}

.fd-ai-question {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid rgba(251, 251, 251, 0.3);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(166, 99, 204, 0.35) 0%, rgba(111, 45, 189, 0.25) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 100%;
}
.fd-ai-field {
    margin-bottom: 16px;
}
.fd-ai-field label, .fd-ai-options-grid label {
    display: block;
    color: rgba(251, 251, 251, 0.95);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.fd-ai-q-text, .fd-ai-opt-text, .fd-ai-explanation {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid rgba(251, 251, 251, 0.4);
    background: #000000;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    overflow: hidden; /* Hide scrollbars as we auto-expand */
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-height: 45px; /* Ensure they don't start too small */
    transition: height 0.1s ease;
}
.fd-ai-q-text:focus, .fd-ai-opt-text:focus, .fd-ai-explanation:focus {
    border-color: rgba(166, 99, 204, 0.95);
    outline: none;
    box-shadow: 0 0 0 4px rgba(111, 45, 189, 0.2);
}
.fd-ai-options-grid {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.fd-ai-options-grid label {
    margin-bottom: 4px;
}
.fd-ai-option {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    width: 100%;
}

.fd-ai-opt-text {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* Fullscreen Overlay Styles */
.fullscreen-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none; /* Controlled by JS */
    place-items: center;
    padding: 20px;
}

.fullscreen-overlay.active {
    display: grid !important;
}

.overlay-content {
    max-width: 500px;
    width: 100%;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: #ffffff;
}

.overlay-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #ff3b30;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.overlay-content p {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.overlay-content .vap-btn {
    font-size: 18px;
    padding: 15px 40px;
}

/* Hide navigation class */
.header-nav-center.hidden-exam-mode {
    display: none !important;
}

/* --- Professional Library & Choice Styles --- */
.fd-create-choice-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 60px 20px;
}

.choice-card {
    flex: 1;
    max-width: 400px;
    min-height: 200px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.choice-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.choice-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.choice-desc {
    font-size: 14px;
    opacity: 0.6;
    line-height: 1.5;
}

.lib-header-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.fd-lib-tabs {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lib-tab-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 12px 35px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.lib-tab-btn.active {
    background: #ff3b30;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

.lib-empty-state {
    padding: 60px;
    text-align: center;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 20px;
}

.lib-empty-state p {
    font-size: 18px;
    opacity: 0.6;
    font-weight: 600;
}

.lib-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.lib-book-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 12px solid #00f2fe; /* Book Spine effect */
    border-radius: 4px 15px 15px 4px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    box-shadow: 10px 10px 20px rgba(0,0,0,0.3);
}

.lib-book-card::after {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.1);
    box-shadow: 1px 0 3px rgba(0,0,0,0.5);
}

.lib-book-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-color: rgba(0, 242, 254, 0.4);
    transform: translateY(-8px) rotateY(-5deg);
    box-shadow: 20px 20px 40px rgba(0,0,0,0.5);
}

.lib-book-card.locked {
    border-left-color: #ff3b30;
    opacity: 0.8;
}

.lib-book-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: white;
}

.lib-book-card .author {
    font-size: 14px;
    opacity: 0.5;
    margin-bottom: 20px;
    display: block;
}

.lib-book-card .count {
    font-size: 28px;
    font-weight: 900;
}

.lib-mcq-item.glass-premium {
    background: rgba(15, 10, 30, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.lib-mcq-item.glass-premium:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.pag-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 800;
}

.pag-btn.active {
    background: #ff3b30;
    border-color: #ff3b30;
}

/* --- Subscription & Limitation Styles --- */
.sub-status-card {
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

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

.sub-header h3 {
    margin: 0;
    font-size: 20px;
}

.sub-tier-badge {
    padding: 6px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sub-tier-badge.paid {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: black;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.sub-usage-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.usage-item label {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    opacity: 0.7;
    text-transform: uppercase;
    font-weight: 700;
}

.usage-bar-wrap {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.usage-bar {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.usage-text {
    font-size: 13px;
    font-weight: 600;
}

.vap-btn.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: black;
    width: 100%;
    font-weight: 800;
    border: none;
}

.vap-btn.gold:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
}

.pro-tag {
    font-size: 9px;
    background: #FFD700;
    color: black;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 900;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
    cursor: default;
}

.lock-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Locks for buttons */
.btn.locked {
    position: relative;
    opacity: 0.6;
    cursor: not-allowed !important;
    filter: grayscale(0.8);
}

.pro-lock {
    margin-left: 10px;
    font-size: 14px;
}

/* Hide some features if locked */
.fd-manual-q-block.locked {
    pointer-events: none;
    user-select: none;
}

/* --- Admin Portal Premium Design (Glassmorphism 2.0) --- */
#admin-portal-shell {
    position: fixed;
    inset: 0;
    z-index: 6000; /* Highest priority */
    background: radial-gradient(circle at 50% -20%, #1a0b2e, #050505);
    color: #fff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.admin-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Refinement */
.admin-sidebar {
    width: 280px;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 40px 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-brand {
    padding: 0 32px 48px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* --- Faculty Dashboard Layout --- */
.fd-dashboard-layout {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start; /* Align to top to prevent cutting on small screens */
    gap: 40px;
    width: 100%;
    height: auto;
    min-height: 100%;
    padding-top: 20px;
}

.fd-welcome-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    color: #fff; /* Ensure all text here is white */
}

.fd-welcome-vap-letters {
    font-size: 64px;
    font-weight: 900;
    margin: 20px 0;
    background: linear-gradient(to right, #fff, #00f2fe);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fd-live-monitor {
    width: 420px;
    height: calc(100vh - 250px);
    min-height: 500px;
    max-height: 750px;
    background: rgba(15, 10, 30, 0.4);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    margin-right: -10px;
}

.monitor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: #ff3b30;
}

.monitor-header-actions {
    display: flex;
    gap: 10px;
}

.monitor-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    gap: 8px;
    padding: 0 8px;
    white-space: nowrap;
}

.monitor-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.fd-live-monitor.maximized {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-height: none;
    z-index: 9999;
    margin: 0;
    background: rgba(10, 10, 20, 0.98);
    backdrop-filter: blur(50px);
    padding: 40px;
}

.fd-live-monitor.maximized .monitor-action-btn {
    width: auto;
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.4);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.2);
}

.fd-live-monitor.maximized .monitor-action-btn:hover {
    background: rgba(255, 59, 48, 0.4);
    transform: translateY(-2px);
}

/* Fix for monitor going behind menu bar */
body.monitor-maximized header {
    z-index: 1000 !important;
}

body.monitor-maximized .main-content {
    z-index: 9999 !important;
    position: relative;
}

.live-pulse {
    width: 10px;
    height: 10px;
    background: #ff3b30;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff3b30;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

.monitor-controls select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-family: inherit;
}

.monitor-stats-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    flex: 1;
    text-align: center;
}

.monitor-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    padding-bottom: 40px; /* Extra space for the last card */
    scrollbar-gutter: stable;
}

.monitor-list::-webkit-scrollbar { width: 6px; }
.monitor-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

.monitor-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    transition: transform 0.2s;
}

.monitor-card:hover { background: rgba(255,255,255,0.05); }

.monitor-card-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.monitor-name { font-weight: 700; font-size: 14px; }
.monitor-status { font-size: 10px; padding: 3px 8px; border-radius: 4px; font-weight: 800; }
.status-writing { background: rgba(0, 242, 254, 0.1); color: #00f2fe; }
.status-done { background: rgba(52, 199, 89, 0.1); color: #34c759; }

.webcam-monitor-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#webcam-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect */
}

#webcam-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ai-status-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(52, 199, 89, 0.8);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 4px;
    border-radius: 4px;
    text-align: center;
    backdrop-filter: blur(4px);
    letter-spacing: 1px;
}

.ai-status-badge.warning { background: #ff3b30; }

.monitor-card-details {
    display: flex;
    gap: 15px;
    font-size: 11px;
    opacity: 0.6;
}

.monitor-card.suspicious {
    border: 2px solid #ff3b30;
    background: rgba(255, 59, 48, 0.1);
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.3);
    animation: dangerPulse 2s infinite;
}

@keyframes dangerPulse {
    0% { border-color: #ff3b30; }
    50% { border-color: #ff9500; }
    100% { border-color: #ff3b30; }
}

.monitor-warning { color: #ff3b30; font-weight: 800; opacity: 1; }

.monitor-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0.5;
    font-size: 13px;
    padding: 0 20px;
}

.admin-brand i {
    color: #00f2fe;
}

.admin-nav {
    flex: 1;
    padding: 0 16px;
}

.admin-nav-btn {
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.admin-nav-btn i {
    font-size: 18px;
    opacity: 0.7;
}

.admin-nav-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.admin-nav-btn.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(113, 23, 234, 0.1));
    color: #fff;
    border: 1px solid rgba(0, 242, 254, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-nav-btn.active i {
    color: #00f2fe;
    opacity: 1;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 0; /* Remove default padding for container control */
}

.admin-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 50px 60px;
}

.admin-tab {
    display: none;
    animation: adminFloatIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.admin-tab.active {
    display: block;
}

@keyframes adminFloatIn {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-tab-header {
    margin-bottom: 48px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-tab-header h2 {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(to right, #fff, rgba(255,255,255,0.6));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* Premium Glass Cards */
.glass-premium {
    background: rgba(20, 20, 25, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 
        inset 0 0 20px rgba(255, 255, 255, 0.03),
        0 10px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-premium:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Revenue Hero Stat */
.revenue-hero-card {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(113, 23, 234, 0.15));
    border: 1px solid rgba(0, 242, 254, 0.3);
    padding: 24px 32px;
    border-radius: 24px;
    text-align: right;
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.1);
}

.revenue-hero-card label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    display: block;
    margin-bottom: 4px;
    font-weight: 800;
}

.revenue-total {
    font-size: 42px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* AI Usage & Monitoring */
.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-header i {
    font-size: 20px;
    color: #00f2fe;
}

.stat-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    opacity: 0.9;
}

/* Neon Progress Bar */
.usage-progress-wrap {
    height: 18px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    overflow: hidden;
    margin: 20px 0 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.usage-bar {
    height: 100%;
    background: linear-gradient(90deg, #00f2fe, #7117ea);
    border-radius: 50px;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom iOS Switch */
.switch-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    border-radius: 16px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input:checked + .slider {
    background: linear-gradient(90deg, #00f2fe, #7117ea);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Data Cards Grid */
.data-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.data-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
}

.data-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 242, 254, 0.2);
    transform: translateY(-5px);
}

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

.data-card-user {
    font-weight: 700;
    font-size: 16px;
}

.data-card-subtext {
    font-size: 12px;
    opacity: 0.5;
    margin-top: 4px;
}

.data-card-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-pending {
    background: rgba(255, 149, 0, 0.1);
    color: #ff9500;
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.data-card-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #00f2fe;
    opacity: 0.8;
    background: rgba(0, 242, 254, 0.05);
    padding: 8px 12px;
    border-radius: 10px;
    margin: 16px 0;
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite linear;
    border-radius: 12px;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.admin-sidebar-footer {
    padding: 0 16px;
    margin-top: auto;
}

#admin-logout-btn {
    width: 100%;
    justify-content: center;
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

#admin-logout-btn:hover {
    background: #ff3b30;
    color: #fff;
}

.admin-entry {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.admin-entry:hover {
    opacity: 1;
}

.admin-entry a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
}

/* Plan and Lock Styles */
.lib-book-card {
    position: relative;
    overflow: hidden;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.glowing-lock {
    font-size: 32px;
    color: #ff3b30;
    text-shadow: 0 0 15px rgba(255, 59, 48, 0.8);
    animation: lock-glow 2s infinite ease-in-out;
}

@keyframes lock-glow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 25px rgba(255, 59, 48, 1); }
}

.admin-mode-tag {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #00f2fe;
    padding: 8px 15px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Admin Form UI Fixes */
.admin-form .field,
.admin-section .field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-form .field label,
.admin-section .field label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}

.admin-form .field input,
.admin-form .field textarea,
.admin-section .field input,
.admin-section .field textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.admin-form .field input:focus,
.admin-form .field textarea:focus,
.admin-section .field input:focus,
.admin-section .field textarea:focus {
    border-color: #00f2fe;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.fd-manual-questions .field textarea {
    width: 100% !important;
}

/* Notification Badge & Icon */
.notification-bell-wrap {
    position: absolute;
    top: 15px;
    right: 40px;
    cursor: pointer;
    z-index: 100;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.notification-bell-wrap:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}
.notification-bell-wrap i {
    font-size: 18px;
    color: var(--accent);
}
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff3b30;
    color: #fff;
    font-size: 9px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    border: 2px solid #1a1a1a;
}

.sub-status-card {
    position: relative;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    color: #fff;
}
.sub-status-card h3 {
    color: #fff !important;
    font-size: 20px;
    margin-bottom: 25px;
    opacity: 0.9;
}
.usage-item label {
    color: rgba(255,255,255,0.7) !important;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.usage-bar-wrap {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}
.usage-bar {
    height: 100%;
    background: linear-gradient(90deg, #00f2fe 0%, #4facfe 100%);
    box-shadow: 0 0 15px rgba(0,242,254,0.3);
    border-radius: 10px;
}
.usage-text {
    color: rgba(255,255,255,0.5) !important;
    font-size: 11px;
    font-weight: 700;
}
.sub-tier-badge {
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 900;
}
.sub-tier-badge.paid {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
}

.notification-panel {
    position: absolute;
    top: 70px;
    right: 20px;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(15,15,15,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 0;
    display: none;
    z-index: 1000;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.notification-panel.active {
    display: block;
    animation: slideInDown 0.3s ease;
}
.notification-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    font-weight: 800;
    color: var(--accent);
}
.notification-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 13px;
    color: #fff;
    transition: background 0.3s ease;
}
.notification-item:hover {
    background: rgba(255,255,255,0.03);
}
.notification-item:last-child { border-bottom: none; }
.notification-item .time {
    font-size: 10px;
    opacity: 0.4;
    display: block;
    margin-top: 6px;
}
.notification-item.unread {
    background: rgba(0,242,254,0.05);
    border-left: 3px solid var(--accent);
}

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

.pro-tag {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

/* Admin Grouped View */
.admin-grouped-section {
    margin-bottom: 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.grouped-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.3s;
    user-select: none;
}

.grouped-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.grouped-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.grouped-content.collapsed {
    display: none;
}


