:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --secondary-light: #f472b6;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --success: #10b981;
    --purple: #a855f7;
    --cyan: #06b6d4;
    --orange: #f97316;
    --dark: #1f2937;
    --dark-light: #374151;
    --light: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Subject Colors */
    --math-color: #3b82f6;
    --math-light: #60a5fa;
    --ela-color: #8b5cf6;
    --ela-light: #a78bfa;
    --science-color: #10b981;
    --science-light: #34d399;
    --social-color: #f59e0b;
    --social-light: #fbbf24;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rise 15s infinite ease-in;
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 120px;
    height: 120px;
    left: 25%;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 50%;
    animation-delay: 4s;
}

.bubble:nth-child(4) {
    width: 100px;
    height: 100px;
    left: 70%;
    animation-delay: 6s;
}

.bubble:nth-child(5) {
    width: 90px;
    height: 90px;
    left: 85%;
    animation-delay: 8s;
}

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0);
    }
    50% {
        transform: translateX(100px);
    }
    100% {
        bottom: 110vh;
        transform: translateX(-100px);
    }
}

/* Header */
header {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 4rem 2rem 3rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
    z-index: 10;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.header-content h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    font-weight: 300;
}

.award {
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    color: var(--white);
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    margin-top: 1rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.award:hover {
    transform: scale(1.05);
}

.award i {
    margin-right: 0.5rem;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 150px;
    transition: all 0.3s ease;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fbbf24, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Fade in animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-in-delay-1 {
    animation: fadeIn 1s ease-in 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s both;
}

.fade-in-delay-3 {
    animation: fadeIn 1s ease-in 0.9s both;
}

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

/* Tab Navigation */
.tab-nav {
    display: flex;
    justify-content: center;
    background: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.tab-btn {
    background: none;
    border: none;
    padding: 1.5rem 2.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--dark);
    border-bottom: 4px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-btn:hover::before {
    width: 100%;
}

.tab-btn:hover {
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.05));
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.1));
}

.tab-btn.active::before {
    width: 100%;
}

.tab-btn i {
    font-size: 1.3rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
    background: var(--light);
    min-height: 80vh;
}

.tab-content {
    display: none;
    animation: slideIn 0.5s ease;
}

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

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

h2 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 800;
}

h2 i {
    margin-right: 1rem;
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

h3 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Philosophy Section */
.philosophy-hero {
    margin-bottom: 3rem;
}

.hero-photo {
    max-width: 100%;
    height: 500px;
    border-radius: 30px;
    box-shadow: var(--shadow-xl);
}

.philosophy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.phil-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.phil-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    background-size: 200% 100%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.phil-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.card-animate {
    animation: cardEntry 0.6s ease-out both;
}

.card-animate:nth-child(2) {
    animation-delay: 0.2s;
}

.card-animate:nth-child(3) {
    animation-delay: 0.4s;
}

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

.phil-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.phil-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.editable-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--dark-light);
}

.edit-btn-mini {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.edit-btn-mini:hover {
    transform: rotate(90deg) scale(1.1);
}

/* Timeline Section */
.journey-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.journey-text {
    font-size: 1.3rem;
    color: var(--dark-light);
    max-width: 700px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary), var(--accent));
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 1;
    grid-row: 1;
}

.timeline-item:nth-child(even) .timeline-marker {
    grid-column: 2;
}

.timeline-marker {
    grid-column: 2;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    box-shadow: var(--shadow-xl);
    z-index: 10;
    position: relative;
    align-self: start;
}

.timeline-content {
    grid-column: 3;
}

.year {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.achievement {
    background: var(--white);
    padding: 2rem;
    border-radius: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.achievement:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-xl);
}

.achievement h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
}

.achievement h3 i {
    color: var(--accent);
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out both;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out both;
}

.slide-in-left:nth-child(2) {
    animation-delay: 0.3s;
}

.slide-in-right:nth-child(2) {
    animation-delay: 0.3s;
}

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

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

/* Photo Placeholders */
.photo-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    border: 3px dashed var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-placeholder:hover {
    border-color: var(--secondary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.15));
    transform: scale(1.02);
}

.photo-placeholder span {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.photo-placeholder span i {
    font-size: 2rem;
}

.photo-placeholder input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder.small {
    height: 250px;
    margin-bottom: 1.5rem;
}

/* Gallery */
.gallery-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-intro p {
    font-size: 1.2rem;
    color: var(--dark-light);
}

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

.gallery-item {
    background: var(--white);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    position: relative;
}

.gallery-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    z-index: 10;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: scale(1);
}

.hover-lift:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-xl);
}

.gallery-item .photo-placeholder {
    height: 300px;
    border-radius: 0;
    border: none;
    margin: 0;
}

.caption {
    padding: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.caption:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    color: var(--primary);
}

.caption i {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Plany Section */
.plany-hero {
    background: var(--white);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
}

.plany-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.plany-screenshot .photo-placeholder {
    height: 600px;
    border-radius: 20px;
}

.plany-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--purple), var(--cyan));
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.plany-badge i {
    margin-right: 0.5rem;
}

.plany-intro {
    font-size: 1.2rem;
    color: var(--dark-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-box {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.05));
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.feature-box:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.feature-box h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.feature-box p {
    font-size: 0.95rem;
    color: var(--dark-light);
}

.plany-footer {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    padding: 1.5rem;
    border-radius: 15px;
    margin: 2rem 0;
    border-left: 5px solid var(--accent);
}

.plany-footer p {
    font-style: italic;
    color: var(--dark-light);
}

.plany-footer i {
    color: var(--accent);
}

/* Buttons */
.edit-btn, .add-year-btn, .add-photo-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-btn:hover, .add-year-btn:hover, .add-photo-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.pulse-btn {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.add-year-btn, .add-photo-btn {
    display: flex;
    margin: 3rem auto 0;
    background: linear-gradient(135deg, var(--accent), var(--orange));
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--success), var(--cyan));
    color: var(--white);
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.glow-btn {
    position: relative;
    overflow: hidden;
}

.glow-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;
}

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

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark), var(--dark-light));
    color: var(--white);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
}

.footer-section h3 i {
    color: var(--accent);
}

.footer-section p {
    opacity: 0.9;
    line-height: 1.8;
}

.footer-section a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: center;
}

.footer-bottom p {
    opacity: 0.8;
}

.footer-bottom i.fa-heart {
    color: var(--secondary);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-top:hover {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .plany-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .timeline::before {
        left: 40px;
    }
    
    .timeline-item {
        grid-template-columns: 80px 1fr;
        gap: 1.5rem;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        grid-column: 2;
    }
    
    .timeline-content {
        grid-column: 2;
    }
    
    .timeline-marker {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .tab-nav {
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .tab-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .tab-btn span {
        display: none;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .philosophy-cards {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 2rem 1rem;
    }
    
    .plany-hero {
        padding: 2rem 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Version Badge */
.version-badge {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--dark), var(--dark-light));
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    opacity: 0.7;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.version-badge:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.version-badge i {
    font-size: 0.75rem;
    color: var(--accent);
}

.version-badge:hover i {
    color: var(--white);
}

/* Changelog Modal */
.changelog-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.changelog-modal.active {
    opacity: 1;
    visibility: visible;
}

.changelog-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.changelog-modal.active .changelog-content {
    transform: translateY(0) scale(1);
}

.changelog-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.changelog-title i {
    font-size: 1.5rem;
}

.changelog-title h3 {
    flex: 1;
    margin: 0;
    font-size: 1.3rem;
    color: var(--white);
}

.changelog-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.2s ease;
}

.changelog-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.changelog-body {
    padding: 1.5rem;
    max-height: 50vh;
    overflow-y: auto;
}

.changelog-release {
    margin-bottom: 1.5rem;
}

.changelog-release:last-child {
    margin-bottom: 0;
}

.changelog-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.changelog-version {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 700;
}

.changelog-date {
    color: var(--dark-light);
    font-size: 0.85rem;
}

.changelog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-list li {
    padding: 0.4rem 0 0.4rem 1.5rem;
    position: relative;
    color: var(--dark-light);
    font-size: 0.9rem;
}

.changelog-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.changelog-footer {
    padding: 1rem 1.5rem;
    background: var(--light);
    text-align: center;
    border-top: 1px solid var(--border);
}

.changelog-footer p {
    margin: 0;
    color: var(--dark-light);
    font-size: 0.85rem;
}

/* Adjust scroll-top button position when version badge is present */
.scroll-top {
    bottom: 4rem;
}

@media (max-width: 768px) {
    .version-badge {
        bottom: 0.5rem;
        right: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .scroll-top {
        bottom: 3.5rem;
        right: 0.5rem;
        width: 50px;
        height: 50px;
    }
    
    .changelog-content {
        width: 95%;
        max-height: 85vh;
    }
}

/* ==========================================
   LOGIN SCREEN STYLES
   ========================================== */

.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-screen.hidden {
    display: none;
}

.login-container {
    background: var(--white);
    border-radius: 24px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    text-align: center;
    animation: slideIn 0.5s ease;
}

/* Scrollbar styling for login container */
.login-container::-webkit-scrollbar {
    width: 6px;
}

.login-container::-webkit-scrollbar-track {
    background: transparent;
}

.login-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.login-header {
    margin-bottom: 1.5rem;
}

.login-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.login-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--dark-light);
    font-size: 1rem;
}

.login-content {
    margin-bottom: 2rem;
}

.login-welcome {
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.google-login-btn:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.google-login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.google-login-btn img {
    width: 24px;
    height: 24px;
}

.login-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--dark-light);
}

.login-note i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.login-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.about-preview-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.about-preview-link:hover {
    color: var(--secondary);
}

.about-preview-link i {
    margin-right: 0.5rem;
}

/* ==========================================
   MAIN APP & TOP NAVIGATION
   ========================================== */

.main-app {
    min-height: 100vh;
}

.main-app.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 101;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-brand i {
    font-size: 1.5rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.user-name {
    font-weight: 500;
    color: var(--dark);
}

.logout-btn {
    background: none;
    border: none;
    color: var(--dark-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    color: var(--secondary);
    background: rgba(236, 72, 153, 0.1);
}

/* ==========================================
   SUBJECT HEADERS
   ========================================== */

.subject-header {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.subject-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.5;
}

.subject-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.subject-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: none;
    -webkit-text-fill-color: var(--white);
    position: relative;
    z-index: 1;
}

.subject-tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.math-header {
    background: linear-gradient(135deg, var(--math-color), var(--math-light));
}

.ela-header {
    background: linear-gradient(135deg, var(--ela-color), var(--ela-light));
}

.science-header {
    background: linear-gradient(135deg, var(--science-color), var(--science-light));
}

.social-header {
    background: linear-gradient(135deg, var(--social-color), var(--social-light));
}

/* ==========================================
   SUBJECT CONTENT
   ========================================== */

.subject-content {
    padding: 1rem 0;
}

.content-section {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    position: relative;
}

.content-section h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-section h3 i {
    color: var(--primary);
}

/* ==========================================
   RESOURCES GRID
   ========================================== */

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

.resource-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.resource-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.resource-card h4 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.resource-list {
    min-height: 100px;
    margin-bottom: 1rem;
}

.resource-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.resource-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

.resource-item a {
    color: var(--dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.resource-item a i {
    color: var(--primary);
}

.resource-item a:hover {
    color: var(--primary);
}

.delete-resource {
    background: none;
    border: none;
    color: var(--dark-light);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-resource:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    min-height: 100px;
    margin-bottom: 1rem;
}

.resource-photo {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.resource-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-photo .delete-resource {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resource-photo:hover .delete-resource {
    opacity: 1;
}

.empty-state {
    color: var(--dark-light);
    font-style: italic;
    text-align: center;
    padding: 2rem 1rem;
}

.upload-btn,
.add-link-btn,
.upload-photo-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.upload-btn:hover,
.add-link-btn:hover,
.upload-photo-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ==========================================
   ABOUT SECTION STYLES
   ========================================== */

.about-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.about-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.3;
}

.about-header .header-content {
    position: relative;
    z-index: 2;
}

.about-header .header-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-sub-nav {
    display: flex;
    justify-content: center;
    background: var(--white);
    padding: 0;
    border-radius: 0 0 20px 20px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.about-tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    color: var(--dark-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.about-tab-btn:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.about-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.about-tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.about-tab-content.active {
    display: block;
}

/* About tab button in main nav */
.tab-btn.about-tab {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
}

.tab-btn.about-tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
}

/* ==========================================
   MODAL STYLES
   ========================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    color: var(--dark);
}

.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-light);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--dark);
    background: var(--light);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.upload-preview {
    margin-top: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn-cancel,
.btn-save {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: var(--light);
    border: none;
    color: var(--dark-light);
}

.btn-cancel:hover {
    background: var(--border);
}

.btn-save {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: var(--white);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ==========================================
   ADMIN-ONLY ELEMENTS
   ========================================== */

.admin-only {
    /* Will be hidden via JS for non-admins */
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
    .top-nav {
        padding: 0.75rem 1rem;
    }
    
    .nav-brand span {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .login-container {
        padding: 2rem 1.5rem;
    }
    
    .subject-header {
        padding: 2rem 1rem;
    }
    
    .subject-header h2 {
        font-size: 1.8rem;
    }
    
    .subject-icon {
        font-size: 3rem;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .about-header h1 {
        font-size: 2rem;
    }
    
    .about-sub-nav {
        justify-content: flex-start;
    }
    
    .about-tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .about-tab-btn span {
        display: none;
    }
}
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 10px;
}

.student-item .student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.student-info {
    flex: 1;
}

.student-info .student-name {
    font-weight: 600;
    display: block;
}

.student-info .student-email {
    font-size: 0.85rem;
    color: var(--dark-light);
}

.student-points {
    color: var(--accent);
    font-weight: 600;
}

/* Filters */
.assignments-filters,
.gradebook-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--white);
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Assignments */
.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assignment-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.assignment-card:hover {
    box-shadow: var(--shadow-lg);
}

.assignment-card-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.assignment-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
}

.assignment-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.assignment-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--dark-light);
}

.subject-tag {
    text-transform: capitalize;
    background: var(--light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.assignment-card-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.submission-stats {
    font-size: 0.9rem;
    color: var(--dark-light);
}

/* Resources Tabs */
.resources-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.resource-tab-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border);
    background: var(--white);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.resource-tab-btn:hover {
    border-color: var(--primary);
}

.resource-tab-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.resources-section {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
}

.resources-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.resources-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Messages */
.messages-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.announcements-section,
.messages-section {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
}

.announcements-section h3,
.messages-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.announcement-item {
    padding: 1rem;
    background: var(--light);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.announcement-item p {
    margin: 0 0 0.5rem 0;
}

.announcement-date {
    font-size: 0.8rem;
    color: var(--dark-light);
}

/* ==========================================
   STUDENT DASHBOARD STYLES
   ========================================== */

.student-nav {
    background: linear-gradient(135deg, var(--success), var(--cyan));
}

.student-nav .nav-brand {
    color: var(--white);
}

.student-nav .user-name {
    color: var(--white);
}

.student-nav .logout-btn {
    color: rgba(255,255,255,0.8);
}

.student-nav .logout-btn:hover {
    color: var(--white);
    background: rgba(255,255,255,0.1);
}

.student-points {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--white);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.student-points i {
    color: #fbbf24;
}

/* Student Welcome */
.student-welcome {
    text-align: center;
    margin-bottom: 2rem;
}

.student-welcome h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.welcome-date {
    color: var(--dark-light);
}

/* Student Dashboard Grid */
.student-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.dashboard-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    background: var(--primary);
    color: var(--white);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Todo List */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.todo-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

.todo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
}

.todo-info {
    flex: 1;
}

.todo-title {
    font-weight: 600;
    display: block;
}

.todo-due {
    font-size: 0.8rem;
    color: var(--dark-light);
}

/* Progress */
.progress-overview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-label {
    width: 100px;
    font-size: 0.9rem;
    color: var(--dark-light);
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: var(--light);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.math-progress { background: var(--math-color); }
.ela-progress { background: var(--ela-color); }
.science-progress { background: var(--science-color); }
.social-progress { background: var(--social-color); }

.progress-percent {
    width: 40px;
    text-align: right;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Achievements */
.achievements-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    border-radius: 12px;
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
}

.achievement-badge i {
    font-size: 1.5rem;
}

.achievement-badge.locked {
    background: var(--light);
    color: var(--dark-light);
    opacity: 0.6;
}

/* Student Announcements */
.student-announcement {
    padding: 1rem;
    background: var(--light);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.student-announcement p {
    margin: 0 0 0.5rem 0;
}

.announcement-meta {
    font-size: 0.8rem;
    color: var(--dark-light);
}

/* Student Subject Content */
.current-unit-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.current-unit-card h3 {
    margin-bottom: 0.75rem;
}

.subject-assignments,
.subject-resources {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.subject-assignments h3,
.subject-resources h3 {
    margin-bottom: 1rem;
}

.student-assignment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.assignment-status {
    font-size: 1.25rem;
}

.assignment-status.completed {
    color: var(--success);
}

.assignment-status.pending {
    color: var(--border);
}

.assignment-details {
    flex: 1;
}

.assignment-details h4 {
    margin: 0 0 0.25rem 0;
}

.assignment-details p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--dark-light);
}

/* Work Tabs */
.work-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.work-tab-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border);
    background: var(--white);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.work-tab-btn:hover {
    border-color: var(--primary);
}

.work-tab-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.work-list {
    display: none;
}

.work-list.active {
    display: block;
}

/* ==========================================
   MODAL ADDITIONS
   ========================================== */

.modal-large {
    max-width: 600px;
}

.modal-small {
    max-width: 350px;
}

.modal-body.center {
    text-align: center;
}

.class-code-display {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0.5rem;
    color: var(--primary);
    padding: 1.5rem;
    background: var(--light);
    border-radius: 12px;
    margin: 1.5rem 0;
    font-family: monospace;
}

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

.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

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

.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--white);
}

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

.attachment-area {
    padding: 1rem;
    border: 2px dashed var(--border);
    border-radius: 10px;
    text-align: center;
}

/* Assignment View Modal */
.assignment-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.assignment-subject-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    color: var(--white);
    font-weight: 600;
    text-transform: capitalize;
}

.assignment-due {
    color: var(--dark-light);
    display: flex;
    align-items: center;
}

.assignment-points-badge {
    background: var(--accent);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.assignment-instructions {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.student-submission h4 {
    margin-bottom: 1rem;
}

.submission-area textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.submission-area textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Grade Modal */
.score-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-input input {
    width: 80px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Empty States */
.empty-state-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 16px;
    color: var(--dark-light);
}

.empty-state-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.empty-state-card .btn-primary {
    margin-top: 1rem;
}

.empty-state-small {
    text-align: center;
    padding: 1.5rem;
    color: var(--dark-light);
    font-style: italic;
}

/* App Footer */
.app-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--dark-light);
    font-size: 0.9rem;
    margin-top: 2rem;
}

.app-footer i.fa-heart {
    color: var(--secondary);
}

/* ==========================================
   RESPONSIVE - TWO STREAM
   ========================================== */

@media (max-width: 1024px) {
    .student-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .messages-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .login-option-btn {
        padding: 1rem;
    }
    
    .login-option-btn .option-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .option-title {
        font-size: 1.1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .classes-grid {
        grid-template-columns: 1fr;
    }
    
    .assignment-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .assignment-card-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .class-actions {
        flex-wrap: wrap;
    }
    
    .student-welcome h2 {
        font-size: 1.5rem;
    }
    
    .achievements-list {
        justify-content: center;
    }
}

/* ==========================================
   STUDENT LOGIN - CLASS CODE & NAME SELECT
   ========================================== */

.back-to-main-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.back-to-main-btn:hover {
    color: var(--secondary);
}

.student-code-entry,
.student-select-screen,
.student-pin-screen {
    position: relative;
    max-width: 450px;
    padding: 1.5rem;
}

.student-code-entry .login-header,
.student-select-screen .login-header,
.student-pin-screen .login-header {
    margin-bottom: 1rem;
}

.student-code-entry .login-header h2,
.student-select-screen .login-header h2,
.student-pin-screen .login-header h2 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.student-code-entry .login-header p,
.student-select-screen .login-header p,
.student-pin-screen .login-header p {
    font-size: 0.9rem;
}

.student-icon {
    background: linear-gradient(135deg, var(--success), var(--cyan)) !important;
}

.class-code-input-container {
    margin: 1.5rem 0;
}

.class-code-input {
    width: 100%;
    padding: 1.25rem;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    border: 3px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    transition: border-color 0.3s ease;
}

.class-code-input:focus {
    outline: none;
    border-color: var(--success);
}

.class-code-input::placeholder {
    color: var(--border);
    letter-spacing: 0.3rem;
}

.btn-large {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

/* Student List */
.student-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.student-select-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: var(--light);
    border: 3px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.student-select-btn:hover {
    border-color: var(--success);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.student-select-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.student-select-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark);
    text-align: center;
}

/* PIN Entry */
.student-avatar-preview {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 0.5rem;
}

.pin-input-container {
    padding: 0.5rem 0;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.2s ease;
}

.pin-dot.filled {
    background: var(--success);
    transform: scale(1.1);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-width: 240px;
    margin: 0 auto;
}

.pin-key {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: var(--light);
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-key:hover {
    background: var(--border);
}

.pin-key:active {
    transform: scale(0.95);
}

.pin-key-clear {
    background: #fee2e2;
    color: #ef4444;
}

.pin-key-enter {
    background: #d1fae5;
    color: #10b981;
}

/* ==========================================
   AVATAR SYSTEM STYLES
   ========================================== */

.avatar-tab {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(249, 115, 22, 0.1));
}

.avatar-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--orange));
    color: white;
}

/* Student Nav with Coins */
.student-coins {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.student-coins i {
    color: #92400e;
}

.student-streak {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    color: var(--white);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.student-streak i {
    color: #fbbf24;
}

.nav-avatar-container {
    margin-left: 0.5rem;
}

.mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid rgba(255,255,255,0.5);
}

/* Avatar Page Layout */
.avatar-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.avatar-main {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

/* Avatar Display */
.avatar-display-section {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.avatar-stage {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.avatar-character {
    position: relative;
    width: 120px;
    height: 120px;
}

.avatar-body {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-body-emoji {
    font-size: 5rem;
}

.avatar-face {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 1.2rem;
    line-height: 1;
}

.avatar-eyes {
    display: block;
    font-weight: bold;
    letter-spacing: 0.5rem;
}

.avatar-mouth {
    display: block;
    margin-top: 0.25rem;
}

.avatar-accessory {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
}

.avatar-name-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.edit-name-btn {
    background: none;
    border: none;
    color: var(--dark-light);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.9rem;
}

.edit-name-btn:hover {
    color: var(--primary);
}

.avatar-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.avatar-stats .stat-item {
    text-align: center;
    padding: 0.75rem 1rem;
    background: var(--light);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.avatar-stats .stat-item i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.avatar-stats .stat-item:nth-child(1) i { color: #f59e0b; }
.avatar-stats .stat-item:nth-child(2) i { color: #ef4444; }
.avatar-stats .stat-item:nth-child(3) i { color: #8b5cf6; }

/* Avatar Customization */
.avatar-customization {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.customization-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.custom-tab {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border);
    background: var(--white);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.custom-tab:hover {
    border-color: var(--accent);
}

.custom-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--orange));
    color: var(--white);
    border-color: transparent;
}

.customization-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

.customization-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: var(--light);
    border: 3px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.customization-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.customization-item.selected {
    border-color: var(--success);
    background: #d1fae5;
}

.customization-item.locked {
    opacity: 0.7;
}

.customization-item.locked::after {
    content: '🔒';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8rem;
}

.item-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.item-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.item-price {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.selected-check {
    position: absolute;
    top: 5px;
    right: 5px;
    color: var(--success);
}

/* Achievements Section */
.avatar-achievements-section {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.avatar-achievements-section h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.achievement-item.earned {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.achievement-item.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-icon {
    font-size: 2rem;
}

.achievement-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.achievement-coins {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

/* Earn Coins Section */
.earn-coins-section {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.earn-coins-section h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.earn-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.earn-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 12px;
}

.earn-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--success), var(--cyan));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
}

.earn-info {
    display: flex;
    flex-direction: column;
}

.earn-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.earn-amount {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Notifications */
.achievement-notification,
.coin-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease;
}

.achievement-notification.show,
.coin-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.achievement-popup {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 2px solid #f59e0b;
}

.achievement-popup-icon {
    font-size: 3rem;
}

.achievement-popup-text h4 {
    margin: 0;
    color: #92400e;
    font-size: 1rem;
}

.achievement-popup-text p {
    margin: 0.25rem 0;
    font-weight: 700;
    color: var(--dark);
}

.coins-earned {
    color: var(--accent);
    font-weight: 700;
}

.coin-notification {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: var(--dark);
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: 50px;
    box-shadow: var(--shadow-xl);
}

.coin-reason {
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Form hint */
.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--dark-light);
    margin-top: 0.25rem;
}

/* ==========================================
   RESPONSIVE - AVATAR
   ========================================== */

@media (max-width: 1024px) {
    .avatar-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .student-list-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pin-key {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .avatar-stage {
        width: 160px;
        height: 160px;
    }
    
    .avatar-body-emoji {
        font-size: 4rem;
    }
    
    .customization-tabs {
        justify-content: center;
    }
    
    .custom-tab span {
        display: none;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .earn-methods {
        grid-template-columns: 1fr;
    }
    
    .student-coins,
    .student-streak {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Student Item Avatar Emoji */
.student-avatar-emoji {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.student-item .student-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.student-item .student-coins {
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.student-item .student-pin {
    font-size: 0.8rem;
    color: var(--dark-light);
    font-family: monospace;
}

/* PIN shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Achievement Categories */
.achievement-category {
    margin-bottom: 1.5rem;
}

.achievement-category h4 {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    font-size: 1rem;
}

.achievement-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.achievement-item {
    padding: 0.75rem 0.5rem;
}

.achievement-item .achievement-icon {
    font-size: 1.75rem;
}

.achievement-item .achievement-name {
    font-size: 0.75rem;
}

.achievement-item .achievement-coins {
    font-size: 0.65rem;
}

/* Scrollable achievements section */
.avatar-achievements-section {
    max-height: 500px;
    overflow-y: auto;
}

/* ==========================================
   IMPROVED LOGIN BUTTONS
   ========================================== */

.login-logo {
    margin-bottom: 1rem;
}

.logo-emoji {
    font-size: 4rem;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

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

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

.teacher-login-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.teacher-login-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.student-login-btn {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.student-login-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(17, 153, 142, 0.5);
}

.login-btn-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn-icon .btn-emoji {
    font-size: 2rem;
}

.login-btn-text {
    flex: 1;
}

.login-btn-text .btn-title {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.login-btn-text .btn-desc {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

.login-btn .btn-arrow {
    font-size: 1.25rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.login-btn:hover .btn-arrow {
    transform: translateX(5px);
    opacity: 1;
}

/* Login Mascot */
.login-mascot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255,255,255,0.5);
    border-radius: 50px;
}

.mascot-emoji {
    font-size: 2rem;
    animation: wave 1.5s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.mascot-speech {
    font-weight: 600;
    color: var(--dark);
}

/* About Link */
.about-link {
    color: var(--dark-light);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.about-link:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary);
}

/* Back button */
.back-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0,0,0,0.05);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(0,0,0,0.1);
}

/* Class code input wrapper */
.class-code-input-wrapper {
    margin: 1.5rem 0;
}

.class-code-input {
    width: 100%;
    padding: 1.25rem;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.75rem;
    border: 3px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    transition: all 0.3s ease;
}

.class-code-input:focus {
    outline: none;
    border-color: var(--success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.code-hint {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--dark-light);
    font-size: 0.9rem;
}

/* Fun button */
.btn-fun {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 50px;
}

.btn-fun .btn-emoji {
    font-size: 1.25rem;
}

/* Teacher avatar page */
.teacher-avatar-page .avatar-display-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.teacher-avatar-info {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
}

.teacher-avatar-info p {
    margin: 0;
    font-weight: 600;
}

.teacher-avatar-info .small {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Teacher-only item badge */
.customization-item.teacher-only::before {
    content: '👨‍🏫';
    position: absolute;
    top: 3px;
    left: 3px;
    font-size: 0.7rem;
}

.customization-item.teacher-only {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px dashed #667eea;
}

/* Teacher-Only Items */
.customization-item.teacher-item {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.1));
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.customization-item.teacher-item:hover {
    border-color: var(--primary);
}

.teacher-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 0.7rem;
    background: var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.teacher-avatar-page .avatar-display-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.05));
}

.teacher-avatar-info {
    text-align: center;
    margin-top: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.teacher-avatar-info .small {
    font-size: 0.85rem;
    color: var(--dark-light);
    font-weight: 400;
}

.teacher-avatar-stage {
    border: 3px solid var(--primary);
}

/* ==========================================
   UPDATED LOGIN - STUDENT FIRST, TEACHER SMALL
   ========================================== */

.login-buttons-stacked {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

.login-btn.primary-login {
    width: 100%;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--success), var(--cyan));
    border: none;
    border-radius: 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.login-btn.primary-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.login-btn.primary-login .btn-emoji {
    font-size: 2.5rem;
}

.login-btn.primary-login .btn-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.login-btn.secondary-login {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 25px;
    color: var(--dark-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-btn.secondary-login:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.login-btn.secondary-login i {
    font-size: 1rem;
}

/* Hide old elements in secondary button */
.login-btn.secondary-login .login-btn-icon,
.login-btn.secondary-login .btn-arrow {
    display: none;
}

/* ==========================================
   NEW SVG AVATAR SYSTEM
   ========================================== */

#avatar-svg-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 4px solid white;
    margin: 0 auto;
}

#avatar-svg-container svg {
    width: 100%;
    height: 100%;
}

.avatar-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    padding: 1rem;
    max-height: 350px;
    overflow-y: auto;
}

.avatar-item {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.avatar-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.avatar-item.selected {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
}

.avatar-item.locked {
    opacity: 0.6;
}

.avatar-item.locked::after {
    content: '🔒';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.8rem;
}

.item-preview {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.item-preview svg {
    width: 100%;
    height: 100%;
}

.item-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    color: var(--dark);
}

.item-cost {
    font-size: 0.7rem;
    color: var(--warning);
    font-weight: 600;
}

.item-check {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* Avatar tab buttons */
[data-avatar-tab] {
    padding: 0.5rem 1rem;
    border: none;
    background: var(--light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

[data-avatar-tab]:hover {
    background: var(--border);
}

[data-avatar-tab].active {
    background: var(--primary);
    color: white;
}

.avatar-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.avatar-panel {
    display: none;
}

.avatar-panel.active {
    display: block;
}

.mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mini-avatar svg {
    width: 100%;
    height: 100%;
}

/* Notification */
.avatar-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.avatar-notification.show {
    transform: translateX(0);
}

/* Avatar Builder Layout */
.avatar-builder {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 1rem;
}

@media (max-width: 768px) {
    .avatar-builder {
        grid-template-columns: 1fr;
    }
}

.avatar-preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-light);
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--light);
    color: var(--primary);
}

.avatar-customize-section {
    background: var(--light);
    border-radius: 16px;
    padding: 1rem;
}

.section-subtitle {
    color: var(--dark-light);
    margin-bottom: 1.5rem;
}

.panel-hint {
    font-size: 0.85rem;
    color: var(--primary);
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* Teacher Exclusive Items */
.avatar-item.teacher-exclusive {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    border: 2px solid rgba(139, 92, 246, 0.4);
}

.avatar-item.teacher-exclusive:hover {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.teacher-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 0.7rem;
    background: linear-gradient(135deg, var(--primary), #EC4899);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* ==========================================
   PDF ASSIGNMENT BUILDER
   ========================================== */

.pdf-builder {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    background: var(--light);
    overflow: hidden;
}

.pdf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.5rem;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.page-info input {
    width: 50px;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
}

.zoom-level {
    font-size: 0.85rem;
    color: var(--dark-light);
    min-width: 45px;
    text-align: center;
}

.pdf-main {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.pdf-sidebar {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    background: white;
    border-right: 1px solid var(--border);
    padding: 1rem;
    padding-right: 0.5rem;
    overflow-y: scroll !important;
    overflow-x: hidden;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f5f9;
}

/* Custom scrollbar for webkit browsers */
.pdf-sidebar::-webkit-scrollbar {
    width: 8px;
}

.pdf-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.pdf-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.pdf-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Ensure sidebar content doesn't prevent scrolling */
.pdf-sidebar > * {
    flex-shrink: 0;
}

.pdf-sidebar h3, .pdf-sidebar h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.sidebar-hint {
    font-size: 0.8rem;
    color: var(--dark-light);
    margin-bottom: 1rem;
}

.field-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.field-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.field-tool i {
    font-size: 1.25rem;
    color: var(--primary);
}

.field-tool:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.field-tool.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.field-tool.active i {
    color: white;
}

.field-list-section {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.field-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.field-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.field-list-item:hover {
    background: var(--light);
}

.field-list-item.selected {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
}

.field-list-item i {
    width: 20px;
    color: var(--dark-light);
}

.required-badge {
    color: var(--danger);
    font-weight: bold;
}

.empty-hint {
    font-size: 0.8rem;
    color: var(--dark-light);
    text-align: center;
    padding: 1rem;
}

.pdf-viewer-container {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.pdf-viewer {
    position: relative;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pdf-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--dark-light);
}

.pdf-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--border);
}

#pdf-canvas {
    display: none;
}

.form-fields-overlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
}

.form-field {
    position: absolute;
    border: 2px dashed var(--primary);
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.05);
    cursor: move;
    box-sizing: border-box;
}

.form-field.selected {
    border-style: solid;
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    resize: none;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    background: rgba(255,255,255,0.9);
}

.checkbox-field,
.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.radio-group {
    padding: 0.5rem;
}

.radio-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    display: block;
}

.drawing-area {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.drawing-canvas {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: crosshair;
    background: white;
}

.drawing-area p {
    font-size: 0.75rem;
    text-align: center;
    color: var(--dark-light);
    margin-top: 0.25rem;
}

.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 2px;
}

.resize-se {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.field-label-badge {
    position: absolute;
    top: -20px;
    left: 0;
    font-size: 0.65rem;
    background: var(--primary);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.pdf-properties {
    width: 250px;
    background: white;
    border-left: 1px solid var(--border);
    padding: 1rem;
    overflow-y: auto;
}

.pdf-properties h3 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.property-group {
    margin-bottom: 1rem;
}

.property-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark-light);
    margin-bottom: 0.25rem;
}

.property-group input[type="text"],
.property-group input[type="number"],
.property-group textarea,
.property-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
}

.property-group input[type="checkbox"] {
    width: auto;
}

.properties-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Student view - no dashed borders */
.pdf-builder:not(.edit-mode) .form-field {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.95);
}

/* PDF Builder Fullscreen Modal - MUST be on top of everything */
.pdf-builder-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    z-index: 99999;
    display: flex;
    flex-direction: column;
}

.pdf-builder-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
    color: white;
    flex-shrink: 0;
}

.pdf-builder-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.pdf-builder-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.pdf-builder-close:hover {
    background: rgba(255,255,255,0.1);
    color: var(--danger);
}

.pdf-builder-modal-body {
    flex: 1 1 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--border);
}

/* Page Manager Panel */
.page-manager-panel {
    background: white;
    border-bottom: 2px solid var(--primary);
    padding: 1rem;
    max-height: 350px;
    overflow-y: auto;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.page-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.page-manager-header h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.page-manager-header p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--dark-light);
}

.page-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    overflow-y: auto;
    padding: 0.5rem 0;
    max-height: 200px;
}

.page-thumbnail {
    flex-shrink: 0;
    position: relative;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.page-thumbnail:hover {
    border-color: var(--primary);
}

.page-thumbnail.selected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.page-thumbnail.removed {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-thumbnail img {
    display: block;
    max-height: 120px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-number {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: var(--dark-light);
}

.removed-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--danger);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
}

.thumbnail-checkbox {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
}

.thumbnail-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.page-manager-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.page-manager-actions .btn-danger,
.page-manager-actions .btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger-icon {
    color: var(--danger) !important;
}

.btn-danger-icon:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

.loading-thumbnails {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-light);
    padding: 2rem;
}

/* Simple page thumbnails for large PDFs */
.page-thumbnail-simple {
    width: 70px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.page-thumbnail-simple .page-thumb-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.page-thumbnail-simple .page-label {
    font-size: 0.65rem;
    color: var(--dark-light);
}

.page-thumbnail-simple.selected .page-thumb-number {
    color: var(--success);
}

.page-thumbnail-simple.removed .page-thumb-number {
    color: var(--dark-light);
    text-decoration: line-through;
}

/* Auto-Add Section */
.auto-add-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.auto-add-section h4 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.auto-add-btn {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.auto-add-btn i {
    color: var(--primary);
}

.auto-add-btn:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
}

/* Auto-Add Dialog */
.auto-add-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.auto-add-dialog-content {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auto-add-dialog-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--dark);
}

.auto-add-dialog-content p {
    margin: 0 0 1.5rem 0;
    color: var(--dark-light);
    font-size: 0.9rem;
}

.dialog-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dialog-form .form-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dialog-form label {
    flex: 0 0 130px;
    font-size: 0.85rem;
    color: var(--dark);
}

.dialog-form input,
.dialog-form select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
}

.dialog-form input:focus,
.dialog-form select:focus {
    outline: none;
    border-color: var(--primary);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ==========================================
   MULTI-TEACHER COLLABORATION STYLES
   ========================================== */

/* Library Grid */
.library-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 12px;
}

.library-filters .search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.library-filters .search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-light);
}

.library-filters .search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
}

.library-filters select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    min-width: 150px;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.library-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

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

.library-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.library-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.library-card-icon.pdf { background: #ef4444; }
.library-card-icon.assignment { background: var(--primary); }
.library-card-icon.resource { background: #10b981; }

.library-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.library-card-meta {
    font-size: 0.8rem;
    color: var(--dark-light);
}

.library-card-description {
    font-size: 0.9rem;
    color: var(--dark-light);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.library-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.library-tag {
    background: var(--light);
    color: var(--dark-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.library-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.library-card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--dark-light);
}

.library-card-stats i {
    margin-right: 0.25rem;
}

/* School Badge */
.school-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.school-badge i {
    font-size: 1rem;
}

/* Teacher Card */
.teacher-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.teacher-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--light);
}

.teacher-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.teacher-info {
    flex: 1;
}

.teacher-name {
    font-weight: 600;
    color: var(--dark);
}

.teacher-role {
    font-size: 0.85rem;
    color: var(--dark-light);
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--light);
    border-radius: 8px;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-grid label:hover {
    background: rgba(139, 92, 246, 0.05);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-light);
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.tab-btn.active {
    color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.tab-content {
    display: none;
}

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

/* Share Preview */
.share-resource-preview {
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.share-resource-preview h4 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.share-resource-preview p {
    color: var(--dark-light);
    font-size: 0.9rem;
}

/* Modal Sizes */
.modal-large {
    max-width: 600px;
}

.modal-fullscreen {
    width: 95vw;
    max-width: 1200px;
    height: 90vh;
    max-height: 90vh;
}

.modal-fullscreen .modal-body {
    height: calc(100% - 60px);
    overflow-y: auto;
}

/* Collaboration Header Actions */
.collab-actions {
    display: flex;
    gap: 0.5rem;
}

.collab-actions .btn-icon {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Invitation Card */
.invitation-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.invitation-info {
    flex: 1;
}

.invitation-info h4 {
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.invitation-info p {
    color: var(--dark-light);
    font-size: 0.85rem;
}

.invitation-actions {
    display: flex;
    gap: 0.5rem;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--dark-light);
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Empty State */
.empty-library-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--dark-light);
}

.empty-library-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-library-state h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

/* ==========================================
   TEACHER PROFILE PAGE
   ========================================== */

.profile-page {
    padding: 1rem;
}

.profile-page h2 {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.profile-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

.profile-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 1rem;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-large svg {
    width: 100%;
    height: 100%;
}

.profile-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-size: 1.5rem;
}

.profile-email {
    color: var(--dark-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.profile-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-teacher {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.badge-admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 1.1rem;
}

.profile-section h4 i {
    color: var(--primary);
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* School Card */
.school-card {
    padding: 1rem;
    background: var(--light);
    border-radius: 10px;
}

.school-card.connected {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.school-card .school-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.school-card .school-code {
    font-family: monospace;
    font-size: 1.1rem;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Colleagues Grid */
.colleagues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.colleague-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 10px;
    transition: transform 0.2s;
}

.colleague-card:hover {
    transform: translateY(-2px);
}

.colleague-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
}

.colleague-avatar svg {
    width: 100%;
    height: 100%;
}

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

.colleague-name {
    font-weight: 500;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.colleague-role {
    font-size: 0.8rem;
    color: var(--dark-light);
}

/* Header avatar */
#teacher-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--light);
}

#teacher-header-avatar svg {
    width: 100%;
    height: 100%;
}

.avatar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--primary);
}

/* ==========================================
   PDF ASSIGNMENT MODAL STYLES
   ========================================== */

.pdf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 1rem;
}

.pdf-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.pdf-modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
}

.pdf-modal-header h3 i {
    color: var(--primary);
}

.pdf-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-light);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.pdf-modal-close:hover {
    color: var(--dark);
}

.pdf-modal-body {
    padding: 1.5rem;
}

.pdf-modal-body .form-group {
    margin-bottom: 1.25rem;
}

.pdf-modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.pdf-modal-body input,
.pdf-modal-body select,
.pdf-modal-body textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
}

.pdf-modal-body input:focus,
.pdf-modal-body select:focus,
.pdf-modal-body textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

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

.assignment-summary {
    background: var(--light);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.assignment-summary h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--dark-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--dark-light);
}

.pdf-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--light);
    border-radius: 0 0 16px 16px;
}

/* ==========================================
   GRADING STYLES
   ========================================== */

.grading-container {
    padding: 1rem;
}

.submissions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.submissions-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.submissions-stats {
    display: flex;
    gap: 1rem;
}

.submissions-stat {
    text-align: center;
    padding: 0.5rem 1rem;
    background: var(--light);
    border-radius: 8px;
}

.submissions-stat .value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.submissions-stat .label {
    font-size: 0.75rem;
    color: var(--dark-light);
}

.submissions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.submission-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.submission-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.submission-student {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.submission-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.submission-name {
    font-weight: 500;
    color: var(--dark);
}

.submission-time {
    font-size: 0.8rem;
    color: var(--dark-light);
}

.submission-grade {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.grade-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grade-input input {
    width: 60px;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 600;
}

.grade-input span {
    color: var(--dark-light);
}

.grade-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.grade-badge.graded {
    background: #dcfce7;
    color: #166534;
}

.grade-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.grade-badge.auto-graded {
    background: #dbeafe;
    color: #1e40af;
}

/* Empty submissions state */
.empty-submissions {
    text-align: center;
    padding: 3rem;
    color: var(--dark-light);
}

.empty-submissions i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Assignment Options Buttons */
.assignment-options-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-large {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.btn-large i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.btn-large span {
    font-size: 1rem;
    font-weight: 600;
}

.btn-large small {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: normal;
}

.btn-large.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-large.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-large.btn-secondary {
    background: var(--light);
    color: var(--dark);
}

.btn-large.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-large.btn-outline {
    background: white;
    color: var(--dark);
    border: 1px solid var(--border);
}

.btn-large.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ==========================================
   FULLSCREEN MODAL STYLES
   ========================================== */

.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 10002;
    display: flex;
    flex-direction: column;
}

.fullscreen-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--dark);
    color: white;
    gap: 1rem;
}

.fullscreen-modal-header .modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.fullscreen-modal-header .modal-title h3 {
    margin: 0;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fullscreen-modal-header .modal-title .subtitle {
    font-size: 0.85rem;
    opacity: 0.7;
}

.fullscreen-modal-header .btn-icon {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
}

.fullscreen-modal-header .btn-icon:hover {
    background: rgba(255,255,255,0.2);
}

.fullscreen-modal-header .modal-info {
    display: flex;
    gap: 0.75rem;
}

.fullscreen-modal-header .due-badge,
.fullscreen-modal-header .points-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.fullscreen-modal-header .due-badge {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.fullscreen-modal-header .points-badge {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.assignment-instructions {
    padding: 0.75rem 1rem;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Student PDF Container */
.student-pdf-container,
.submission-pdf-container {
    flex: 1;
    overflow: auto;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
}

.pdf-student-wrapper,
.pdf-review-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pdf-nav-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

.pdf-canvas-wrapper.student-view,
.pdf-canvas-wrapper.review-view {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 1rem;
    overflow: auto;
}

/* Student Input Fields */
.student-field {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary);
    border-radius: 4px;
}

.student-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    resize: none;
}

.student-input:focus {
    outline: none;
}

.student-checkbox {
    width: 20px;
    height: 20px;
    margin: auto;
    display: block;
}

.mc-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.mc-option:hover {
    background: var(--light);
}

.drawing-canvas {
    width: 100%;
    height: calc(100% - 30px);
    border: 1px solid var(--border);
    background: white;
    cursor: crosshair;
}

.clear-drawing {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    margin-top: 2px;
}

/* Review Mode Styles */
.review-field {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #d1d5db;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

.review-field.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.review-field.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.answer-display {
    display: block;
    color: var(--dark);
}

.correct-answer {
    display: block;
    font-size: 0.75rem;
    color: #22c55e;
    margin-top: 0.25rem;
}

.points-earned {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
}

.drawing-answer {
    max-width: 100%;
    max-height: 100%;
}

/* Grading Controls */
.grading-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.grade-input-large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.grade-input-large input {
    width: 60px;
    background: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.grade-input-large span {
    font-size: 1.1rem;
}

/* Submission Summary */
.submission-summary {
    text-align: center;
    padding: 1.5rem;
}

.submission-summary h4 {
    margin: 0 0 0.5rem 0;
    color: var(--dark);
}

.grade-display {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 12px;
}

.grade-score {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.grade-percent {
    display: block;
    font-size: 1.25rem;
    color: var(--dark-light);
}

.pending-grade {
    color: var(--dark-light);
    font-style: italic;
}

/* ==========================================
   FEATURE CARD - PDF BUILDER BUTTON
   ========================================== */

.feature-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
}

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-card > * {
    position: relative;
    z-index: 1;
}

.feature-card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.feature-card-icon i {
    font-size: 1.75rem;
    color: white;
}

.feature-card-content {
    flex: 1;
    min-width: 0;
}

.feature-card-content h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.feature-card-content p {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--dark-light);
    line-height: 1.4;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: var(--light);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--dark-light);
    font-weight: 500;
}

.feature-tags span i {
    font-size: 0.7rem;
    color: var(--primary);
}

.feature-card-arrow {
    width: 44px;
    height: 44px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}

.feature-card-arrow i {
    color: var(--primary);
    font-size: 1rem;
    transition: transform 0.3s;
}

.feature-card:hover .feature-card-arrow {
    background: var(--primary);
}

.feature-card:hover .feature-card-arrow i {
    color: white;
    transform: translateX(3px);
}

/* PDF Builder specific card */
.pdf-builder-card .feature-card-icon {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

/* Responsive */
@media (max-width: 600px) {
    .feature-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .feature-card-content h3 {
        font-size: 1.1rem;
    }
    
    .feature-tags {
        justify-content: center;
    }
    
    .feature-card-arrow {
        margin-top: 0.5rem;
    }
}

/* Pulse animation for new feature highlight */
@keyframes feature-pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
    }
    50% {
        box-shadow: 0 4px 25px rgba(139, 92, 246, 0.25);
    }
}

.feature-card.highlight {
    animation: feature-pulse 2s ease-in-out infinite;
}

/* ==========================================
   ASSIGN TO CLASS SECTION
   ========================================== */

.assign-to-class-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.assign-to-class-section .section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 0.75rem;
}

.assign-to-class-section .section-label i {
    font-size: 1.1rem;
}

.class-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.class-select-large {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid #bae6fd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.class-select-large:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.class-select-large:hover {
    border-color: #0ea5e9;
}

.class-select-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #0369a1;
}

.class-select-hint i {
    font-size: 0.9rem;
}

/* When class is selected - success state */
.assign-to-class-section.assigned {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #22c55e;
}

.assign-to-class-section.assigned .section-label {
    color: #166534;
}

.assign-to-class-section.assigned .class-select-large {
    border-color: #86efac;
}

.assign-to-class-section.assigned .class-select-large:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* ==========================================
   ASSIGN TO CLASSES MODAL
   ========================================== */

.assign-section {
    background: var(--light);
    border-radius: 12px;
    padding: 1rem;
}

.assign-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--dark);
}

.assign-section h4 i {
    color: var(--primary);
}

.hint-text {
    font-size: 0.9rem;
    color: var(--dark-light);
    margin-bottom: 1rem;
}

.classes-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 250px;
    overflow-y: auto;
}

.class-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.class-checkbox-item:hover:not(.already-assigned) {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.class-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.class-checkbox-item .class-name {
    flex: 1;
    font-weight: 500;
    color: var(--dark);
}

.class-checkbox-item .student-count {
    font-size: 0.85rem;
    color: var(--dark-light);
}

.class-checkbox-item .assigned-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 20px;
}

.class-checkbox-item.already-assigned {
    opacity: 0.7;
    cursor: default;
}

.class-checkbox-item:has(input:checked):not(.already-assigned) {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.empty-hint, .error-hint {
    text-align: center;
    padding: 1rem;
    color: var(--dark-light);
}

.error-hint {
    color: #ef4444;
}

.loading-small {
    text-align: center;
    padding: 1rem;
    color: var(--dark-light);
}

.loading-small i {
    margin-right: 0.5rem;
}

/* Success button */
.btn-large.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.btn-large.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Assignment status indicators */
.assigned-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.assigned-info i {
    font-size: 1.1rem;
}

.not-assigned-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.not-assigned-info i {
    font-size: 1.1rem;
}

/* Edit warning */
.edit-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.edit-warning i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ==========================================
   BITMOJI STYLES
   ========================================== */

.bitmoji-welcome {
    width: 100px;
    height: auto;
    flex-shrink: 0;
}

.bitmoji-subject {
    width: 80px;
    height: auto;
    flex-shrink: 0;
}

.bitmoji-small {
    width: 60px;
    height: auto;
    margin-bottom: 0.5rem;
}

.student-welcome {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.student-welcome .welcome-text h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.3rem;
}

.student-welcome .welcome-text p {
    margin: 0;
    color: var(--dark-light);
}

.subject-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.subject-header.math-header {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.subject-header.ela-header {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.subject-header.science-header {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.subject-header.social-header {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
}

.subject-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.subject-header .subject-tagline {
    margin: 0;
    font-size: 0.9rem;
    color: var(--dark-light);
}

.empty-state-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    color: var(--dark-light);
}

.empty-state-small p {
    margin: 0;
}

/* Student assignment item improvements */
.student-assignment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.student-assignment-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.student-assignment-item.pdf-assignment .assignment-status {
    color: #ef4444;
}

.student-assignment-item .assignment-status {
    font-size: 1.25rem;
    color: var(--primary);
}

.student-assignment-item .assignment-details {
    flex: 1;
    min-width: 0;
}

.student-assignment-item .assignment-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-assignment-item .assignment-details p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--dark-light);
}

.btn-fun {
    background: linear-gradient(135deg, var(--success), #10b981);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-fun:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Subject content */
.subject-content {
    padding: 0 0.5rem;
}

.subject-assignments h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.subject-assignments h3 i {
    color: var(--primary);
}

/* ==========================================
   LOADING SPINNERS & BUTTON STATES
   ========================================== */

/* Global Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.8s ease-in-out infinite;
}

.loading-spinner.dark {
    border-color: rgba(0,0,0,0.1);
    border-top-color: var(--primary);
}

.loading-spinner.large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.loading-spinner.small {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Full Page Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    gap: 1rem;
}

.loading-overlay .loading-spinner {
    width: 50px;
    height: 50px;
    border-width: 4px;
    border-color: var(--primary-light);
    border-top-color: var(--primary);
}

.loading-overlay p {
    color: var(--dark-light);
    font-size: 1rem;
}

/* Section Loading State */
.section-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--dark-light);
    gap: 1rem;
}

.section-loading .loading-spinner {
    width: 36px;
    height: 36px;
    border-color: var(--border);
    border-top-color: var(--primary);
}

/* Button Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading .btn-text {
    visibility: hidden;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}

.btn-secondary.btn-loading::after,
.btn-outline.btn-loading::after {
    border-color: rgba(0,0,0,0.1);
    border-top-color: var(--primary);
}

/* Button with inline spinner */
.btn-with-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-with-spinner .loading-spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 80px;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

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

/* Card Loading State */
.card-loading {
    position: relative;
    min-height: 100px;
}

.card-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s ease-in-out infinite;
}

/* Pulse Animation for Loading Items */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Progress Bar Loading */
.progress-loading {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-loading::after {
    content: '';
    display: block;
    height: 100%;
    width: 30%;
    background: var(--primary);
    border-radius: 2px;
    animation: progress-loading 1.5s ease-in-out infinite;
}

@keyframes progress-loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* Disabled button states */
button:disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Toast/Notification Loading */
.toast-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--dark);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
}

.toast-loading .loading-spinner {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

/* ==========================================
   LOADING SPINNERS & BUTTON STATES
   ========================================== */

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
}

.spinner-dark {
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: var(--primary);
}

.spinner-small {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.spinner-large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading .btn-text {
    visibility: hidden;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
}

.btn-secondary.btn-loading::after,
.btn-outline.btn-loading::after {
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: var(--primary);
}

/* Full Page Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner {
    width: 50px;
    height: 50px;
    border-width: 4px;
    border-color: var(--light);
    border-top-color: var(--primary);
}

.loading-overlay p {
    margin-top: 1rem;
    color: var(--dark-light);
    font-size: 1rem;
}

/* Card/Section Loading */
.loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--dark-light);
}

.loading-card .spinner {
    margin-bottom: 1rem;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.skeleton-card {
    height: 100px;
    border-radius: 12px;
}

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

/* Button Success State */
.btn-success-state {
    background: var(--success) !important;
    border-color: var(--success) !important;
}

.btn-success-state::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    animation: none;
    border: none;
}

/* Progress indicator in buttons */
.btn-progress {
    position: relative;
    overflow: hidden;
}

.btn-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: rgba(255,255,255,0.2);
    transition: width 0.3s ease;
}

/* Pulse animation for loading states */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Inline loading text */
.loading-dots::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* Toast/Notification styles */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 1.5rem;
    background: var(--dark);
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

.toast i {
    font-size: 1.25rem;
}

/* ==========================================
   CUSTOM POPUP/ALERT SYSTEM WITH BITMOJI
   ========================================== */

.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.custom-popup {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.custom-popup-bitmoji {
    width: 120px;
    height: auto;
    margin: 0 auto 1rem;
}

.custom-popup-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.custom-popup-icon.success { color: #22c55e; }
.custom-popup-icon.error { color: #ef4444; }
.custom-popup-icon.warning { color: #f59e0b; }
.custom-popup-icon.info { color: #3b82f6; }

.custom-popup h3 {
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    color: var(--dark);
}

.custom-popup p {
    color: var(--dark-light);
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.custom-popup-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.custom-popup-buttons button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-popup .btn-popup-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
}

.custom-popup .btn-popup-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.custom-popup .btn-popup-secondary {
    background: var(--light);
    color: var(--dark);
    border: 2px solid var(--border);
}

.custom-popup .btn-popup-secondary:hover {
    border-color: var(--primary);
}

.custom-popup .btn-popup-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
}

.custom-popup .btn-popup-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
}

/* Confirm dialog specific */
.custom-popup.confirm-popup .custom-popup-buttons {
    flex-direction: row;
}

/* Input popup */
.custom-popup-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.custom-popup-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==========================================
   ASSIGNMENT VIEW TABS
   ========================================== */

.assignment-view-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: var(--light);
    border-radius: 12px;
}

.view-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-weight: 600;
    color: var(--dark-light);
    cursor: pointer;
    transition: all 0.2s;
}

.view-tab-btn:hover {
    background: white;
    color: var(--dark);
}

.view-tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.view-tab-btn .tab-count {
    background: var(--border);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    min-width: 1.5rem;
    text-align: center;
}

.view-tab-btn.active .tab-count {
    background: var(--primary-light);
    color: var(--primary);
}

/* ==========================================
   STUDENT IMPORT MODAL
   ========================================== */

.import-modal-content {
    max-width: 550px;
}

.import-instructions {
    background: var(--light);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.import-instructions h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: var(--dark);
}

.import-instructions p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--dark-light);
    line-height: 1.5;
}

.import-instructions code {
    background: white;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
}

.import-upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.import-upload-area:hover,
.import-upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.import-upload-area i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.import-upload-area p {
    margin: 0;
    color: var(--dark-light);
}

.import-upload-area input[type="file"] {
    display: none;
}

.import-textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.import-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.import-preview {
    background: var(--light);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.import-preview h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.import-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.import-preview-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
}

.import-preview-item i {
    color: var(--success);
}

.import-preview-item.error i {
    color: #ef4444;
}

.import-or-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    color: var(--dark-light);
    font-size: 0.85rem;
}

.import-or-divider::before,
.import-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Assignment card status badges */
.assignment-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.assignment-status-badge.assigned {
    background: #dcfce7;
    color: #16a34a;
}

.assignment-status-badge.draft {
    background: #fef3c7;
    color: #d97706;
}

.assignment-status-badge.saved {
    background: #e0e7ff;
    color: #4f46e5;
}

/* Class count on assignment cards */
.assignment-class-count {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--dark-light);
}

.assignment-class-count i {
    color: var(--primary);
}

/* ==========================================
   DELETE BUTTON STYLES
   ========================================== */

.btn-danger-outline {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444;
}

.btn-danger-outline:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.btn-large.btn-danger-outline {
    margin-top: 0.5rem;
    border-style: dashed;
}

.btn-large.btn-danger-outline small {
    color: #f87171;
}

/* Assignment options buttons spacing */
.assignment-options-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-large {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.btn-large i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.btn-large span {
    font-weight: 600;
    font-size: 1rem;
}

.btn-large small {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: normal;
}

.btn-large.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.btn-large.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-large.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-large.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-large.btn-secondary {
    background: var(--light);
    color: var(--dark);
    border-color: var(--border);
}

.btn-large.btn-secondary:hover {
    border-color: var(--primary);
    background: white;
}

.btn-large.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--dark);
}

.btn-large.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ==========================================
   ASSIGNMENT CARD ACTIONS
   ========================================== */

.assignment-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-small {
    background: transparent;
    color: #94a3b8;
}

.btn-delete-small:hover {
    background: #fef2f2;
    color: #ef4444;
}

.no-due-date {
    color: #f59e0b;
    font-style: italic;
}

/* Confirm popup HTML support */
.custom-popup p {
    line-height: 1.6;
}

.custom-popup p strong {
    color: #ef4444;
}

/* ==========================================
   ENSURE JOIN CLASS MODAL STAYS HIDDEN
   ========================================== */

/* Hide join class modal by default - students already have a class from login */
#join-class-modal:not(.active) {
    display: none !important;
}

/* ==========================================
   THEMED BUTTONS - CONSISTENT APP STYLING
   ========================================== */

/* Base button reset */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

/* Primary Button - Gradient Purple/Pink */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

/* Secondary Button - Light with border */
.btn-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--light);
}

/* Success Button - Green gradient */
.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

/* Warning Button - Orange/Yellow */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Info Button - Blue gradient */
.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Danger Button - Red */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Fun Button - Playful with emoji support */
.btn-fun {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    font-weight: 700;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-fun:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Small Button */
.btn-small, .btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Large Button */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 14px;
}

/* Icon Only Button */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    background: var(--light);
    color: var(--dark-light);
    border: 1px solid var(--border);
}

.btn-icon:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
}

/* Outline variants */
.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-success {
    background: transparent;
    border: 2px solid #22c55e;
    color: #22c55e;
}

.btn-outline-success:hover {
    background: #22c55e;
    color: white;
}

/* ==========================================
   SECTION HEADER BUTTONS
   ========================================== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    color: var(--dark);
}

.section-header h2 i {
    color: var(--primary);
}

.section-header .btn,
.section-header button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================
   CLASS DETAIL BUTTONS
   ========================================== */

.class-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.class-actions .btn,
.class-actions button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

#add-student-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

#add-student-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

#import-students-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

#import-students-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#class-code-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

#class-code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ==========================================
   MY CLASSES / ADD CLASS BUTTON
   ========================================== */

#add-class-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#add-class-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ==========================================
   ASSIGNMENT BUTTONS
   ========================================== */

#create-assignment-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

#create-assignment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Assignment card view button */
.assignment-card .btn-small {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.assignment-card .btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ==========================================
   RESOURCES BUTTONS
   ========================================== */

.resource-upload-btn,
[onclick*="openResourceUpload"] {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.resource-upload-btn:hover,
[onclick*="openResourceUpload"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Resource card styling */
.resource-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.resource-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.resource-item a {
    flex: 1;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
}

.resource-item a:hover {
    color: var(--primary);
}

/* ==========================================
   GRADEBOOK BUTTONS
   ========================================== */

#export-grades-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

#export-grades-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* ==========================================
   PROFILE / COLLABORATION BUTTONS
   ========================================== */

#join-school-btn,
.join-school-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

#join-school-btn:hover,
.join-school-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

#invite-teacher-btn,
.invite-teacher-btn {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

#invite-teacher-btn:hover,
.invite-teacher-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

/* ==========================================
   MESSAGES / ANNOUNCEMENT BUTTON
   ========================================== */

#new-announcement-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

#new-announcement-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

/* ==========================================
   MODAL BUTTONS
   ========================================== */

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.modal-footer .btn-cancel,
.modal-footer button[class*="cancel"] {
    background: var(--light);
    color: var(--dark);
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.modal-footer .btn-cancel:hover {
    background: var(--border);
}

.modal-footer .btn-save,
.modal-footer button[class*="save"] {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-footer .btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* ==========================================
   CLASS CARD VIEW BUTTON
   ========================================== */

.class-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.class-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.class-card .view-class-btn,
.class-card .btn-view {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.75rem;
}

.class-card .view-class-btn:hover,
.class-card .btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ==========================================
   BACK BUTTON
   ========================================== */

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light);
    color: var(--dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.back-btn:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
}

/* ==========================================
   DISABLED BUTTON STATE
   ========================================== */

.btn:disabled,
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================
   RESPONSIVE BUTTON ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .class-actions {
        width: 100%;
    }
    
    .class-actions .btn,
    .class-actions button {
        flex: 1;
        justify-content: center;
    }
    
    .btn-lg {
        width: 100%;
    }
}

/* ==========================================
   RESOURCES TABS AND STYLING
   ========================================== */

.resources-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.resource-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-weight: 600;
    color: var(--dark-light);
    cursor: pointer;
    transition: all 0.2s;
}

.resource-tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.resource-tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-color: transparent;
}

.resources-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.resources-header h3 {
    font-size: 1.1rem;
    color: var(--dark);
}

.resources-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ==========================================
   VIEW ASSIGNMENT TAB BUTTONS
   ========================================== */

.view-tab-btn {
    background: white;
    border: 2px solid var(--border);
    color: var(--dark-light);
}

.view-tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.view-tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ==========================================
   STUDENT PDF FORM FIELDS LAYER
   ========================================== */

#form-fields-layer,
.form-fields-layer {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10;
}

#form-fields-layer .form-field,
.form-fields-layer .form-field {
    pointer-events: auto;
}

/* Student PDF container must be relative for absolute positioning */
.pdf-canvas-wrapper.student-view {
    position: relative;
    display: inline-block;
}

.pdf-canvas-wrapper.student-view #pdf-canvas {
    display: block;
}

/* Student wrapper needs proper layout */
.pdf-student-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.pdf-nav-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--dark);
}

.pdf-nav-minimal .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--light);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pdf-nav-minimal .btn-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Student view canvas wrapper */
.pdf-student-wrapper .pdf-canvas-wrapper {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.pdf-student-wrapper .pdf-canvas-wrapper.student-view {
    position: relative;
}

/* Ensure student inputs are interactable */
.student-field {
    box-sizing: border-box;
    z-index: 15;
}

.student-field input,
.student-field textarea,
.student-field select {
    box-sizing: border-box;
}

/* Fullscreen modal for student PDF */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.fullscreen-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    gap: 1rem;
}

.fullscreen-modal-header .modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.fullscreen-modal-header .modal-title h3 {
    font-size: 1.1rem;
    margin: 0;
}

.fullscreen-modal-header .btn-icon {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-modal-header .btn-icon:hover {
    background: rgba(255,255,255,0.3);
}

.fullscreen-modal-header .modal-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fullscreen-modal-header .due-badge,
.fullscreen-modal-header .points-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.85rem;
}

.fullscreen-modal-header .btn-primary {
    background: white;
    color: var(--primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fullscreen-modal-header .btn-primary:hover {
    background: var(--light);
}

.assignment-instructions {
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border-bottom: 1px solid #fcd34d;
    color: #92400e;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.student-pdf-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f5f5f5;
}

.student-pdf-container .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

/* ==========================================
   STUDENT PDF ZOOM CONTROLS
   ========================================== */

.pdf-nav-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}

.pdf-nav-minimal .nav-group,
.pdf-nav-minimal .zoom-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-nav-minimal .page-info {
    font-weight: 600;
    color: var(--dark);
    padding: 0 0.5rem;
    min-width: 100px;
    text-align: center;
}

.pdf-nav-minimal .zoom-level {
    font-weight: 600;
    color: var(--primary);
    min-width: 50px;
    text-align: center;
    font-size: 0.9rem;
}

.pdf-nav-minimal .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--light);
    border: 1px solid var(--border);
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pdf-nav-minimal .btn-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pdf-nav-minimal .btn-icon:active {
    transform: scale(0.95);
}

/* PDF Canvas Container for proper positioning */
.pdf-canvas-container {
    position: relative;
    display: inline-block;
}

.pdf-canvas-container #pdf-canvas {
    display: block;
}

.pdf-canvas-container #form-fields-layer {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.pdf-canvas-container #form-fields-layer .form-field,
.pdf-canvas-container #form-fields-layer .student-field {
    pointer-events: auto;
}

/* Student view scroll container */
#pdf-scroll-container {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    background: #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .pdf-nav-minimal {
        justify-content: center;
        padding: 0.5rem;
    }
    
    .pdf-nav-minimal .nav-group,
    .pdf-nav-minimal .zoom-group {
        gap: 0.25rem;
    }
    
    .pdf-nav-minimal .btn-icon {
        width: 32px;
        height: 32px;
    }
    
    .pdf-nav-minimal .page-info {
        font-size: 0.85rem;
        min-width: 80px;
    }
}

/* ==========================================
   FIX: STUDENT FORM FIELDS POSITIONING
   ========================================== */

/* Container must be positioned for absolute children */
.pdf-canvas-container {
    position: relative !important;
    display: inline-block;
}

/* Form fields layer sits on top of canvas */
.pdf-canvas-container .form-fields-layer,
.pdf-canvas-container #form-fields-layer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    pointer-events: none;
    z-index: 100;
}

/* Individual fields are clickable */
.form-fields-layer .form-field,
.form-fields-layer .student-field,
#form-fields-layer .form-field,
#form-fields-layer .student-field {
    pointer-events: auto !important;
    position: absolute !important;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    overflow: hidden;
    z-index: 101;
}

/* Student input styling */
.student-field .student-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 4px 8px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
}

.student-field .student-input:focus {
    background: rgba(99, 102, 241, 0.05);
}

.student-field textarea.student-input {
    resize: none;
}

.student-field select.student-input {
    cursor: pointer;
}

/* Checkbox styling */
.student-field.checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.student-field .student-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Debug: make fields visible even if empty */
.student-field:empty::after {
    content: 'Field';
    color: #999;
    font-size: 12px;
    padding: 4px;
}

/* ==========================================
   GRADEBOOK STYLES
   ========================================== */

.gradebook-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.gradebook-filters .filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    min-width: 180px;
    cursor: pointer;
}

.gradebook-filters .filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.gradebook-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.gradebook-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.gradebook-table th,
.gradebook-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.gradebook-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.gradebook-table .student-col {
    text-align: left;
    position: sticky;
    left: 0;
    background: white;
    z-index: 5;
    min-width: 150px;
    font-weight: 600;
}

.gradebook-table th.student-col {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    z-index: 15;
}

.gradebook-table .assignment-col {
    min-width: 80px;
    max-width: 120px;
}

.assignment-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.assignment-title {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assignment-points {
    font-size: 0.7rem;
    opacity: 0.8;
}

.gradebook-table .total-col,
.gradebook-table .avg-col {
    font-weight: 600;
    background: var(--light);
}

.grade-cell {
    cursor: pointer;
    transition: all 0.2s;
}

.grade-cell:hover {
    background: var(--light);
}

.grade-cell.no-submission {
    color: #999;
    cursor: default;
}

.grade-value {
    display: block;
    font-weight: 600;
}

.needs-grading {
    display: block;
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 500;
}

/* Grade colors */
.grade-a { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.grade-b { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.grade-c { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.grade-d { background: rgba(249, 115, 22, 0.1); color: #ea580c; }
.grade-f { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

.gradebook-table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

.gradebook-table tbody tr:hover .student-col {
    background: rgba(99, 102, 241, 0.1);
}

@media (max-width: 768px) {
    .gradebook-filters {
        flex-direction: column;
    }
    
    .gradebook-filters .filter-select {
        width: 100%;
    }
    
    .gradebook-table {
        font-size: 0.8rem;
    }
    
    .gradebook-table th,
    .gradebook-table td {
        padding: 0.5rem;
    }
}

/* ==========================================
   PDF REVIEW MODE STYLES
   ========================================== */

.pdf-review-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.pdf-review-wrapper .pdf-canvas-wrapper {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    background: #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Review field styles */
.review-field {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #6b7280;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-field.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.review-field.correct::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #22c55e;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.review-field.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.review-field.incorrect::after {
    content: '✗';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.answer-display {
    font-weight: 600;
    color: var(--dark);
}

.answer-display.checkbox {
    font-size: 1.5em;
}

.correct-answer {
    display: block;
    font-size: 0.75rem;
    color: #22c55e;
    margin-top: 2px;
}

.no-answer {
    color: #9ca3af;
    font-style: italic;
}

/* Submission PDF container */
.submission-pdf-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f5f5f5;
}

.submission-pdf-container .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--dark-light);
}

/* Grading controls in header */
.grading-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.grade-input-large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.grade-input-large input {
    width: 60px;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.grade-input-large span {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}
