@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@700;800;900&display=swap');

/* CSS Reset & Variables */
:root {
    --bg-dark: #0a0f1c;
    --bg-card: rgba(16, 22, 42, 0.7);
    --primary-cyan: #00f3ff;
    --primary-blue: #007cf0;
    --primary-purple: #7928ca;
    --primary-green: #00ff41;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border-glow: rgba(0, 243, 255, 0.3);

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    --bg-overlay: rgba(10, 15, 28, 0.92);
}

/* Light Mode Overrides */
.light-mode {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-overlay: rgba(248, 250, 252, 0.95);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-glow: rgba(0, 124, 240, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.8);
}

.light-mode body::before {
    display: none;
}

.light-mode .navbar {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(15px);
}

/* Premium Light Mode Cards */
.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 243, 255, 0.15);
    box-shadow: 0 10px 30px rgba(176, 190, 209, 0.2);
}

.light-mode .glass-card:hover {
    background: #fff;
    box-shadow: 0 25px 50px rgba(0, 243, 255, 0.15);
    transform: translateY(-10px) scale(1.02);
}

.light-mode .glass-card h3 {
    color: var(--text-main);
}

.light-mode .subject-card,
.light-mode .tool-card {
    border-color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.light-mode .btn-secondary {
    border: 1px solid #334155;
    color: #334155;
}

.light-mode .hero-description-compact p {
    color: #1e293b;
}

.light-mode .hero-description-compact .sub-desc {
    color: #475569;
}

.light-mode .card.glass-card p {
    color: #475569;
}

.light-mode .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
}

.light-mode .modal-content {
    border-color: #eee;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.light-mode .tool-input-group input,
.light-mode .tool-input-group select {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03);
}

.light-mode .resource-item {
    border-bottom-color: #f0f0f0;
}

.light-mode .resource-item:hover {
    background: #f8f9fa;
}

.light-mode .hero-description strong {
    color: #0077b6;
    /* Professional Blue for visibility */
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: #020617;
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

/* Specific class for smooth theme switching - Optimized to avoid universal selector '*' */
.theme-transition,
.theme-transition .navbar,
.theme-transition .glass-card,
.theme-transition .card,
.theme-transition .modal-content,
.theme-transition .subject-card,
.theme-transition .btn,
.theme-transition .footer-content {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
}

/* Premium Mesh Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(10, 15, 28, 0.94), rgba(10, 15, 28, 0.94)),
        url('assets/cyber_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
}

/* Animated Floating Blobs for Premium Feel */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 243, 255, 0.05) 0%, transparent 30%);
    z-index: -1;
    pointer-events: none;
    background-attachment: fixed;
}

/* Dynamic Aura Animation */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary-cyan);
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.15;
    animation: moveBlob 25s infinite alternate;
    will-change: transform;
}

.blob-2 {
    background: var(--primary-green);
    width: 400px;
    height: 400px;
    right: -100px;
    top: -100px;
    animation-delay: -5s;
    opacity: 0.1;
}

@keyframes moveBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, 200px) scale(1.2);
    }

    66% {
        transform: translate(-150px, 50px) scale(0.8);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Light Mode Premium Background */
.light-mode::before {
    background:
        radial-gradient(circle at 0% 0%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
        #f8fafc;
}

.light-mode .blob {
    opacity: 0.05;
    background: #0ea5e9;
}

.light-mode .blob-2 {
    background: #10b981;
}

.light-mode {
    background-color: #f1f5f9;
}

.light-mode::before {
    background:
        radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(34, 197, 94, 0.05) 0%, transparent 40%),
        #f1f5f9;
}

.light-mode::after {
    display: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-cyan);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(5, 10, 16, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.cyber-icon {
    color: var(--primary-cyan);
    text-shadow: var(--neon-glow);
}

.logo-sep {
    color: var(--primary-green);
    margin: 0 5px;
    font-weight: 300;
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links li {
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-links li i {
    font-size: 0.9rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.nav-links li:hover i {
    transform: translateY(-2px);
    opacity: 1;
    color: var(--primary-cyan);
}

.nav-links li:hover,
.nav-links li.active {
    color: var(--primary-cyan);
}

/* Tablet Nav Optimization */
@media (max-width: 1100px) {
    .nav-links {
        gap: 1.2rem;
    }

    .nav-links li {
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.3rem;
    }
}

/* Desktop Large Screen Nav Enhancement */
@media (min-width: 1200px) {
    .nav-links {
        gap: 2.5rem;
    }

    .nav-links li {
        font-size: 1.15rem;
    }

    .nav-links li i {
        font-size: 1rem;
    }
}

.nav-links li.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-cyan);
    box-shadow: var(--neon-glow);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.3rem;
    /* Slightly larger */
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    z-index: 10;
}

.theme-toggle:hover {
    transform: rotate(20deg) scale(1.1);
    color: var(--primary-cyan);
    background: rgba(0, 243, 255, 0.1);
}

.theme-toggle:active {
    transform: scale(0.9) rotate(-10deg);
    transition: transform 0.1s;
}

/* Subtle pulse effect on click */
.theme-toggle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary-cyan);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.5);
    z-index: -1;
}

.theme-toggle:active::after {
    animation: buttonPulse 0.4s ease-out;
}

@keyframes buttonPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.support-btn {
    background: transparent;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: all 0.3s ease;
}

.support-btn:hover {
    background: var(--primary-green);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
}

/* Back Button */
.btn-back {
    background: transparent;
    border: none;
    color: var(--primary-cyan);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    transition: transform 0.3s;
}

.btn-back:hover {
    transform: translateX(-5px);
    color: #fff;
}

/* Layout views */
.view {
    display: none;
    padding: 2rem 5%;
    min-height: 80vh;
    animation: fadeIn 0.5s ease;
}

.view.active-view {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Home Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 0.5rem;
    position: relative;
    /* Basic Glitch Effect Style */
    text-shadow: 2px 2px 0px #ff00f7, -2px -2px 0px var(--primary-cyan);
}

.hero .tagline {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero .highlight {
    color: var(--primary-green);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.hero-description-compact p {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.hero-description-compact .sub-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.typing-text {
    background: linear-gradient(120deg, #fff, var(--primary-cyan), var(--primary-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.typing-text::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--primary-cyan);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.hero-description-compact:hover .typing-text::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.hero-description-compact strong {
    color: #fff;
    font-weight: 600;
}

.light-mode .hero-description {
    color: #475569;
}

.light-mode .hero-description-compact strong {
    color: #0c4a6e;
    font-weight: 700;
}

.light-mode .typing-text {
    background: linear-gradient(120deg, #0077b6, #0ea5e9, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description .sub-desc {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}



/* Professional Blue Removal Cleanup */


.light-mode .dev-icon {
    background: linear-gradient(135deg, #e0f7fa, #fff);
    color: #0077b6;
    border-color: rgba(0, 119, 182, 0.2);
    box-shadow: 0 5px 15px rgba(0, 119, 182, 0.1);
}


.cta-group {
    margin: 1.5rem 0 4rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-cyan), #00dcff);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.6);
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    border-color: var(--primary-cyan);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.15);
    color: var(--primary-cyan);
    transform: translateY(-3px);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
    z-index: -1;
}

.btn:active::after {
    transform: translate(-50%, -50%) scale(1);
    transition: 0s;
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.glass-card {
    background: rgba(15, 22, 35, 0.6);
    border: 1px solid rgba(0, 243, 255, 0.1);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Glowing Border Effect */
.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    /* Border width */
    background: linear-gradient(45deg, transparent, rgba(0, 243, 255, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.4s;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 243, 255, 0.15);
    background: rgba(15, 22, 35, 0.8);
}

.glass-card:hover::before {
    background: linear-gradient(45deg, var(--primary-cyan), var(--primary-green));
    opacity: 1;
}

/* Inner Glow Spot */
.glass-card::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.2) 0%, transparent 70%);
    top: -50%;
    left: -50%;
    border-radius: 50%;
    transition: 0.5s;
    opacity: 0;
    pointer-events: none;
}

.glass-card:hover::after {
    opacity: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.glass-card h3 {
    font-size: 1.5rem;
    margin: 1rem 0;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.glass-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.4));
    transition: transform 0.4s;
}

.subject-card:hover .card-icon {
    transform: scale(1.1);
}

.glass-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.6));
}

/* Ad Banner Redesign */
.ad-banner {
    margin-top: 5rem;
    position: relative;
    padding: 1.5rem 2rem;
    background: rgba(15, 22, 35, 0.6);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 50px;
    /* Pill shape */
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.ad-banner:hover {
    border-color: var(--primary-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
    transform: translateY(-2px);
}

.ad-label {
    background: linear-gradient(90deg, var(--primary-cyan), #0088cc);
    color: #000;
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

.ad-banner p {
    color: #fff;
    font-weight: 600;
    margin: 0;
    font-size: 1.05rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Light Mode Ad Banner */
.light-mode .ad-banner {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.light-mode .ad-banner p {
    color: var(--text-main);
}

/* Footer Redesign */
footer {
    background: rgba(5, 10, 16, 0.95);
    padding: 4rem 5% 2rem;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

/* Footer Top Gradient Line */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-cyan), var(--primary-green), transparent);
    box-shadow: 0 0 15px var(--primary-cyan);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.contact-panel h4 {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.dev-name {
    color: #fff;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.verified-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 2px;
    vertical-align: middle;
}

.verified-badge {
    color: #1d9bf0 !important;
    font-size: 1.4rem !important;
    -webkit-text-fill-color: #1d9bf0 !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    filter: drop-shadow(0 0 5px rgba(29, 155, 240, 0.3));
    display: block !important;
}

.verified-check {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #fff !important;
    font-size: 0.7rem !important;
    -webkit-text-fill-color: #fff !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    font-weight: 900 !important;
    display: block !important;
}

.verified-wrapper:hover {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s ease;
}

.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-link:hover {
    background: var(--primary-cyan);
    color: #000;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 243, 255, 0.3);
    border-color: transparent;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 3rem;
    opacity: 0.6;
}

/* Light Mode Footer */
.light-mode footer {
    background: #fff;
    border-top: 1px solid #eee;
}

.light-mode .dev-name {
    background: linear-gradient(to right, #1a1f2c, #555);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.light-mode .social-link {
    background: #f0f2f5;
    color: #333;
    border-color: #ddd;
}

.light-mode .social-link:hover {
    background: var(--primary-cyan);
    color: #fff;
}

/* Materials Section */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.subject-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-green));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.subject-card:hover {
    transform: translateY(-8px);
    background: rgba(30, 41, 59, 0.6);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 243, 255, 0.3);
}

.subject-card:hover::before {
    transform: scaleX(1);
}

.subject-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    display: inline-block;
}

.subject-card:hover .subject-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 10px var(--primary-cyan));
}

.subject-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.subject-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Light Mode Subject Card */
.light-mode .subject-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.light-mode .subject-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-8px);
    border-color: #cbd5e1;
}

.light-mode .subject-card h3 {
    color: #1e293b;
}

.light-mode .subject-card p {
    color: #64748b;
}



.subject-icon.cpp {
    color: #5e97d0;
}

.subject-icon.dsa {
    color: #a95ed0;
}

.subject-icon.math {
    color: #d05e5e;
}

.subject-icon.networks {
    color: #d0a55e;
}

.subject-icon.cyber {
    color: var(--primary-green);
}

/* --- Advanced Editor Section (Monaco Upgrade) --- */
.editor-container {
    background: #0d1117;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #30363d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    height: 85vh;
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    position: relative;
}

.editor-header {
    background: #161b22;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #30363d;
    height: 60px;
}

.editor-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    background: #21262d;
    border: 1px solid #30363d;
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-icon:hover {
    background: #30363d;
    color: #fff;
    transform: translateY(-2px);
}

.btn-run {
    background: var(--primary-green);
    color: #fff;
    border: none;
    padding: 0 20px;
    height: 38px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.3);
}

.btn-run:hover {
    background: #2ea043;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(35, 134, 54, 0.4);
}

.btn-run i {
    font-size: 0.8rem;
}

/* Light Mode Editor Styles */
.light-mode .editor-header,
.light-mode .output-header-tabs {
    background: #f8f9fa;
    border-bottom-color: #dee2e6;
}

.light-mode .btn-icon {
    background: #fff;
    border-color: #dee2e6;
    color: #555;
}

.light-mode .btn-icon:hover {
    background: #f1f3f5;
    color: #000;
}

/* Light Mode Fixes */
.light-mode .fix-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.light-mode .fix-header {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.light-mode .fix-location {
    background: #cbd5e1;
    color: #475569;
}

.light-mode .output-header {
    background: #f1f5f9;
    border-bottom: 2px solid #e2e8f0;
}

.light-mode .output-tab.active {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    color: var(--primary-blue);
}

.light-mode .editor-header {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.light-mode .control-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.light-mode .control-btn:hover {
    background: #f8fafc;
    color: var(--primary-blue);
}

.light-mode .terminal-output {
    background: #f8f9fa;
    color: #212529;
}

.light-mode .output-tab:hover {
    background: #f1f3f5;
    color: #000;
}

.light-mode .output-tab.active {
    background: #e9ecef;
}

.light-mode .output-tab {
    color: #555;
    border-bottom-color: transparent;
}

.light-mode .output-tab.active {
    color: var(--primary-cyan);
    background: #fff;
    border-bottom-color: var(--primary-cyan);
}

.light-mode .output-tab:hover {
    color: #000;
}

.light-mode .btn-run {
    background: #238636;
    /* Darker, professional green */
}

.light-mode .btn-run:hover {
    background: #2ea043;
}

.light-mode .fix-explanation {
    color: #1e293b;
    font-weight: 500;
}

.light-mode .fix-card {
    background: #fffcfb;
    border: 1px solid #fbdad4;
    box-shadow: 0 4px 10px rgba(244, 135, 113, 0.08);
}

.light-mode .fix-title {
    color: #e04a2c;
}

.light-mode .fix-location {
    background: #f1f5f9;
    color: #475569;
}

.light-mode .fix-suggestion {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

.light-mode .fix-tip {
    color: #64748b;
}

.light-mode #errorCount {
    background: #f1f3f5;
    color: #f48771;
}

.light-mode .editor-container {
    background: #fff;
    border: 1px solid #dee2e6;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.light-mode .editor-output {
    background: #ffffff;
}

.light-mode .terminal-output,
.light-mode .tab-panel {
    background: #fdfdfd;
}

/* Smart Fix Toggle */
.smart-handle-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.switch-mini {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch-mini input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-mini {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #21262d;
    transition: .4s;
    border: 1px solid #30363d;
}

.slider-mini:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider-mini {
    background-color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
}

input:checked+.slider-mini:before {
    transform: translateX(14px);
}

.slider-mini.round {
    border-radius: 20px;
}

.slider-mini.round:before {
    border-radius: 50%;
}

.lang-select {
    background: #0d1117;
    border: 1px solid #30363d;
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 34px;
}

.lang-select:hover {
    border-color: #555;
    background-color: #161b22;
}

.light-mode .lang-select {
    background-color: #fff;
    border-color: #dee2e6;
    color: #212529;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23333'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 14px;
}

/* Language Preview Toggle (AR/EN) */
.lang-preview-toggle {
    display: flex;
    background: #21262d;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid #30363d;
}

.light-mode .lang-preview-toggle {
    background: #f1f3f5;
    border-color: #dee2e6;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.light-mode .lang-btn {
    color: #666;
}

.lang-btn.active {
    background: #30363d;
    color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.light-mode .lang-btn.active {
    background: #fff;
    color: var(--primary-cyan);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.editor-main-layout {
    flex: 1;
    position: relative;
    background: #0d1117;
}

.monaco-wrapper {
    width: 100%;
    height: 100%;
}

/* Ultra-aggressive hide for ANY Monaco overlays or accessibility icons */
.accessibility-widget,
[class*="accessibility-widget"],
[id*="accessibility-widget"],
.monaco-editor .monaco-aria-container,
.monaco-editor .overlayWidgets,
.monaco-editor [role="button"][title*="Keyboard"],
.monaco-editor [role="button"][aria-label*="Keyboard"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0px !important;
    height: 0px !important;
    z-index: -9999 !important;
    left: -9999px !important;
}

.editor-resizer {
    height: 8px;
    background: #161b22;
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #30363d;
    border-bottom: 1px solid #30363d;
    z-index: 10;
    transition: background 0.2s;
}

.light-mode .editor-resizer {
    background: #f1f3f5;
    border-color: #dee2e6;
}

.light-mode .editor-resizer:hover {
    background: #e9ecef;
}

.editor-resizer:hover {
    background: #30363d;
}

.resizer-handle {
    width: 30px;
    height: 3px;
    background: #444;
    border-radius: 2px;
}

.light-mode .resizer-handle {
    background: #adb5bd;
}

.light-mode .resizer-handle {
    background: #adb5bd;
}

.editor-output {
    height: 300px;
    /* Changed from % to px for easier manipulation */
    min-height: 100px;
    max-height: 80%;
    background: #0d1117;
    display: flex;
    flex-direction: column;
}

.output-header-tabs {
    background: #161b22;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #30363d;
}

.tabs-container {
    display: flex;
}

.output-tab {
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.output-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.output-tab.active {
    color: var(--primary-cyan);
    border-bottom-color: var(--primary-cyan);
    background: rgba(0, 243, 255, 0.05);
}

.error-badge {
    background: #f48771;
    color: #000;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-left: 5px;
    transition: all 0.3s;
}

@keyframes pulse-red {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(244, 135, 113, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(244, 135, 113, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(244, 135, 113, 0);
    }
}

.output-tab.pulse .error-badge {
    animation: pulse-red 2s infinite;
}

.btn-clear-output {
    background: transparent;
    border: 1px solid #30363d;
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-output:hover {
    background: #21262d;
    color: #fff;
    border-color: #444;
}

.tab-contents {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.tab-panel {
    display: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.tab-panel.active {
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar for Panels */
.tab-panel::-webkit-scrollbar {
    width: 6px;
}

.tab-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.tab-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.light-mode .tab-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

.terminal-output {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #d1d5db;
    white-space: pre-wrap;
}

/* Smart Fix Styling */
.smart-fix-container {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0.5;
    padding: 3rem 0;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-green);
}

/* Error Card (Egyptian Style) */
.fix-card {
    background: rgba(244, 135, 113, 0.08);
    border: 1px solid rgba(244, 135, 113, 0.25);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    border-left: 5px solid #f48771;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.fix-card:hover {
    transform: translateY(-3px);
    background: rgba(244, 135, 113, 0.12);
    box-shadow: 0 8px 30px rgba(244, 135, 113, 0.15);
}

.fix-card.ar {
    border-left: none;
    border-right: 4px solid #f48771;
    direction: rtl;
    text-align: right;
}

.fix-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.fix-title {
    color: #f48771;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fix-location {
    font-family: var(--font-code);
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 10px;
    border-radius: 6px;
    color: #ccc;
}

.fix-explanation {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e5e7eb;
}

.fix-card.ar .fix-explanation {
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
}

.fix-suggestion {
    background: #090c10;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: #58a6ff;
    overflow-x: auto;
    direction: ltr !important;
    text-align: left !important;
}

.fix-suggestion code {
    white-space: pre;
}

.btn-apply-fix {
    align-self: flex-start;
    background: #238636;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-top: 0.25rem;
}

.fix-card.ar .btn-apply-fix {
    align-self: flex-end;
}

.btn-apply-fix:hover {
    background: #2ea043;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.3);
}

.fix-tip {
    font-size: 0.75rem;
    color: var(--primary-cyan);
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 6px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar for output */
.tab-contents::-webkit-scrollbar {
    width: 6px;
}

.tab-contents::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 10px;
}

.tab-contents::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Interactive Terminal Input */
.terminal-input-line {
    background: #0d1117;
    padding: 5px 20px 15px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-input-line .prompt {
    color: #00ff41;
    font-weight: bold;
    font-size: 14px;
}

.terminal-input-line input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    width: 100%;
    caret-color: var(--primary-cyan);
}

.output-user {
    color: var(--primary-green);
    font-weight: 600;
    margin-left: 5px;
}

/* Output Status Colors */
.terminal-output .prompt {
    color: #00ff41;
    font-weight: bold;
    margin-right: 8px;
}

.terminal-output .success {
    color: #00ff41;
}

.terminal-output .error {
    color: #f48771;
}

/* VS Code Error Red */
.terminal-output .info {
    color: #569cd6;
}

/* VS Code Info Blue */
.terminal-output .warning {
    color: #cca700;
}

.terminal-output .stats {
    display: inline-block;
    color: #858585;
    font-size: 0.8rem;
    border-top: 1px dashed #444;
    width: 100%;
    margin-top: 10px;
    padding-top: 5px;
}

/* Tools Section */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid #2a3b55;
    padding: 1.5rem;
    border-radius: 8px;
}

.tool-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-cyan);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tool-input-group input,
.tool-input-group select {
    background: #050a10;
    border: 1px solid #333;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    outline: none;
}

.tool-result {
    background: #000;
    padding: 10px;
    border-radius: 4px;
    font-family: var(--font-code);
    color: var(--primary-green);
    margin-bottom: 10px;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.btn-tool {
    width: 100%;
    padding: 8px;
    background: var(--primary-cyan);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2005;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* API Settings Modal & Limitations */
.modal-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.limitations-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 243, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 243, 255, 0.1);
}

.limitations-info h3 {
    font-size: 1rem;
    color: var(--primary-cyan);
    margin-bottom: 0.8rem;
    text-transform: none;
    border-bottom: none;
    padding-bottom: 0;
}

.limitations-info ul {
    list-style: none;
}

.limitations-info li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.limitations-info i {
    color: var(--primary-cyan);
    width: 15px;
}

.input-group {
    margin-top: 1rem;
}

.input-group label {
    display: block;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    background: #0d1117;
    border: 1px solid #30363d;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    outline: none;
    font-family: var(--font-main);
}

.light-mode .input-group input {
    background: #fff;
    border-color: #dee2e6;
    color: #000;
}

.modal-content {
    background: rgba(10, 15, 28, 0.95);
    margin: 5vh auto;
    padding: 2.5rem;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    position: relative;
    max-height: 85vh;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content {
    background: rgba(10, 15, 28, 0.95);
    margin: 5vh auto;
    padding: 2.5rem;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    font-size: 2rem;
    color: var(--primary-cyan);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid rgba(0, 243, 255, 0.1);
    padding-bottom: 1rem;
}

.modal-content p {
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.light-mode .modal-content p {
    color: #334155;
}

.resource-group {
    margin-bottom: 2rem;
}

.resource-group h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    font-weight: 700;
}

.resource-group h4 i {
    color: var(--primary-cyan);
}

.playlist-group {
    background: rgba(0, 243, 255, 0.03);
    border: 1px solid rgba(0, 243, 255, 0.1);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 2.5rem;
}

.playlist-group h4 {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    color: var(--primary-cyan) !important;
}

.light-mode .playlist-group {
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
}

.light-mode .playlist-group h4 {
    color: #0369a1 !important;
}

.playlist-items {
    list-style: none;
    margin-top: 1.5rem;
    padding-left: 0.5rem;
    border-left: 2px dashed rgba(0, 243, 255, 0.2);
    animation: slideDown 0.3s ease-out;
}

.chapter-item {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
}

.chapter-item:hover {
    background: rgba(0, 243, 255, 0.08) !important;
    border-color: rgba(0, 243, 255, 0.2) !important;
}

.chapter-item span i {
    color: var(--primary-green) !important;
}

.task-card {
    background: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1rem 1.25rem !important;
    border-radius: 12px !important;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px !important;
    transition: all 0.3s ease !important;
}

.task-card:hover {
    border-color: rgba(0, 243, 255, 0.2) !important;
    background: rgba(15, 23, 42, 0.6) !important;
    transform: translateX(4px);
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Better for multiline titles */
    width: 100%;
    gap: 12px;
}

.task-title {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-cyan);
    display: flex;
    align-items: flex-start;
    /* Align icon with first line */
    gap: 10px;
    letter-spacing: 0.3px;
    line-height: 1.4;
    padding-top: 2px;
}

.task-title i {
    margin-top: 3px;
    /* Precise alignment with text height */
    font-size: 0.8rem;
    opacity: 0.8;
}

.task-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 2px;
}

@media (max-width: 480px) {
    .task-card {
        padding: 0.85rem 1rem !important;
    }

    .task-title {
        font-size: 0.8rem;
    }

    .btn-copy-alt {
        padding: 4px 10px !important;
        font-size: 0.6rem !important;
        letter-spacing: 0;
    }

    .btn-copy-alt i {
        font-size: 0.7rem;
    }

    .task-chevron {
        font-size: 0.7rem;
    }

    /* Specific Fix for long titles like OOP Course */
    .resource-item.long-text {
        padding: 0.7rem 0.85rem !important;
        gap: 6px !important;
    }

    .resource-item.long-text span {
        font-size: 0.75rem !important;
        font-weight: 600 !important;
    }

    .resource-item.long-text .btn-xs {
        min-width: 80px !important;
        padding: 6px 12px !important;
        font-size: 0.65rem !important;
    }
}

.task-chevron {
    font-size: 0.8rem;
    opacity: 0.5;
    transition: transform 0.3s;
}

.task-content-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    font-family: var(--font-code);
    line-height: 1.5;
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-top: 1rem;
    border-left: 2px solid rgba(0, 243, 255, 0.1);
}

.light-mode .task-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02) !important;
}

.light-mode .task-title {
    color: #0369a1;
}

.light-mode .task-content-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    border-left-color: #0ea5e9;
}

.btn-copy-alt {
    background: rgba(0, 243, 255, 0.05) !important;
    color: var(--primary-cyan) !important;
    border: 1px solid rgba(0, 243, 255, 0.2) !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease !important;
    text-transform: uppercase;
}

.btn-copy-alt:hover {
    background: var(--primary-cyan) !important;
    color: #000 !important;
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.4);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.playlist-separator {
    text-align: center;
    margin: 15px 0;
    font-weight: 800;
    color: var(--primary-cyan);
    font-size: 0.9rem;
    position: relative;
    opacity: 0.8;
}

.playlist-separator::before,
.playlist-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.3), transparent);
}

.playlist-separator::before {
    left: 0;
}

.playlist-separator::after {
    right: 0;
}

.resource-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1rem 1.25rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 100% !important;
}


/* Modal Chapters Chic Animation */
.nested-chapter {
    list-style: none;
    margin-bottom: 5px;
}

.sub-chapters-container {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    padding: 0 1rem 0 15px;
    border-left: 2px dashed rgba(0, 243, 255, 0.2);
    margin-left: 15px;
    display: flex;
    flex-direction: column;
}

.sub-chapters-container.active {
    max-height: 4000px;
    opacity: 1;
    padding: 10px 1rem 25px 15px;
}

.sub-resource {
    opacity: 0;
    transform: translateX(-15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-chapters-container.active .sub-resource {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered delay for modal sub-resources */
.sub-chapters-container.active .sub-resource:nth-child(1) {
    transition-delay: 0.05s;
}

.sub-chapters-container.active .sub-resource:nth-child(2) {
    transition-delay: 0.1s;
}

.sub-chapters-container.active .sub-resource:nth-child(3) {
    transition-delay: 0.15s;
}

.sub-chapters-container.active .sub-resource:nth-child(n+4) {
    transition-delay: 0.2s;
}


.resource-item:hover {
    transform: translateX(8px);
    background: rgba(0, 243, 255, 0.05) !important;
    border-color: rgba(0, 243, 255, 0.3) !important;
}

.resource-item span {
    color: #e2e8f0;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.resource-item span i {
    margin-right: 10px;
    opacity: 0.7;
}

.btn-xs {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    min-width: 90px !important;
    flex-shrink: 0 !important;
    border: none !important;
    transition: all 0.2s !important;
}

.btn-xs.download {
    background: var(--primary-green) !important;
    color: #000 !important;
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.2) !important;
}

.btn-xs.watch {
    background: #ff4d4d !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.2) !important;
}

.btn-xs:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

/* Redundant View style removed - standardized to Download */

/* Light Mode Modal */
.light-mode .modal-content {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.light-mode .modal-content h2 {
    color: #1a1f2c;
    border-bottom-color: #f1f5f9;
}

.light-mode .resource-group {
    background: transparent;
    border: none;
    margin-bottom: 2rem;
}

.light-mode .resource-group h4 {
    color: #1e293b;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.8rem;
    font-weight: 800;
}

.light-mode .resource-group h4 i {
    color: #0ea5e9;
}

.light-mode .resource-item {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.25rem !important;
    margin-bottom: 8px;
    border: 1px solid #eef2f6 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s;
}

.light-mode .resource-item:hover {
    transform: translateX(5px);
    border-color: #0ea5e9 !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.08);
}

.light-mode .resource-item span {
    color: #475569;
    font-weight: 500;
}

.light-mode .resource-item span i {
    color: #64748b;
    margin-right: 8px;
}

.light-mode .btn-xs.download {
    background: #0ea5e9 !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2) !important;
}

.light-mode .btn-xs.watch {
    background: #f43f5e !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.2) !important;
}

.modal-content.small-modal {
    max-width: 380px;
    padding: 2rem;
    margin: 0 !important;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.light-mode .modal-content.small-modal {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

@keyframes modalPop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.small-modal h2 {
    font-size: 1.5rem;
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: none;
    padding-bottom: 0;
    text-align: center;
}

.small-modal p {
    text-align: center;
    font-size: 1rem;
}

.small-modal p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-align: center;
}

.light-mode .small-modal p {
    color: #475569;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    z-index: 100;
}

.light-mode .close-modal {
    color: #000;
}

.close-modal:hover {
    color: var(--primary-cyan);
}

.support-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-support {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.1), rgba(0, 255, 65, 0.1));
    color: #fff;
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.light-mode .btn-support {
    color: #1e293b;
    border-color: #cbd5e1;
    background: #f8fafc;
}

.btn-support:hover {
    background: var(--primary-cyan);
    color: #000;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.btn-support.et {
    border-color: #99c432;
    background: rgba(153, 196, 50, 0.1);
}

.btn-support.et:hover {
    background: #99c432;
    color: #fff;
    box-shadow: 0 0 20px rgba(153, 196, 50, 0.4);
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(10, 15, 28, 0.95);
    color: var(--primary-cyan);
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--primary-cyan);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 243, 255, 0.2);
    z-index: 9999;
    font-weight: 600;
    font-size: 0.9rem;
    animation: toastSlide 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes toastSlide {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-notification.fade-out {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.light-mode .toast-notification {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.arabic-bold {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 1.4rem !important;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-card);
    border: 1px solid var(--primary-cyan);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--neon-glow);
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
}

.notification-toast.active {
    transform: translateX(0);
}

.notif-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-cyan);
    font-size: 1.2rem;
}

.notif-content h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: var(--primary-cyan);
}

.notif-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 2rem auto;
}

.schedule-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.schedule-item:hover {
    transform: translateX(10px);
    border-color: var(--primary-cyan);
    background: rgba(0, 243, 255, 0.05);
}

.item-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.item-content {
    flex: 1;
}

.item-content h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 3px;
}

.item-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.item-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-preview,
.btn-download {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-preview {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-preview:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-download {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-green));
    color: #000;
    border: none;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.2);
}

.large-modal {
    max-width: 900px !important;
    width: 90% !important;
}

/* Light Mode Adjustments */
.light-mode .schedule-item {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.light-mode .schedule-item:hover {
    background: #f0f9ff;
}

.light-mode .item-content h3.arabic-bold {
    color: #0f172a;
}

.light-mode .item-content p {
    color: #475569;
}

.light-mode .item-icon {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.light-mode .btn-preview {
    background: #f8fafc;
    color: #1e293b;
    border-color: #e2e8f0;
}

/* Footer */
footer {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #000 100%);
    padding: 2rem 5% 1rem;
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--primary-cyan), var(--primary-green), transparent) 1;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-panel {
    text-align: center;
}

.contact-panel h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.dev-name {
    background: linear-gradient(120deg, var(--primary-cyan), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.2);
}

.copyright {
    color: #666;
    font-size: 0.75rem;
    margin-top: 1.2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .navbar {
        padding: 0.8rem 1rem;
        gap: 8px;
        justify-content: space-between;
    }

    .logo {
        font-size: 1.1rem;
        gap: 6px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 10px);
        right: 15px;
        left: 15px;
        width: auto;
        background: rgba(15, 23, 42, 0.98);
        padding: 1.5rem;
        z-index: 2000;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        gap: 12px;
        backdrop-filter: blur(25px);
        animation: menuFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-menu-btn {
        display: flex !important;
    }
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 0.95rem;
    }

    .nav-links.active li {
        width: 100%;
        text-align: left;
        padding: 12px 20px;
        border-radius: 12px;
        border-bottom: none;
        color: #fff;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.02);
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .nav-links.active li i {
        font-size: 1.1rem;
        width: 25px;
        text-align: center;
    }

    .nav-links.active li:hover {
        background: rgba(0, 243, 255, 0.1);
        color: var(--primary-cyan);
    }

    .nav-links.active li.active {
        background: linear-gradient(90deg, rgba(0, 243, 255, 0.2), transparent);
        border-left: 3px solid var(--primary-cyan);
    }

    .nav-links.active li.active i {
        color: var(--primary-cyan);
        text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    }

    /* Light Mode Mobile Menu */
    .light-mode .nav-links.active {
        background: #ffffff;
        /* Solid white background */
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .light-mode .nav-links.active li {
        color: #1e293b;
        background: rgba(0, 0, 0, 0.02);
        border-bottom: none;
    }

    .light-mode .nav-links.active li:hover {
        background: rgba(0, 243, 255, 0.05);
        color: var(--primary-cyan);
    }

    .light-mode .nav-links.active li.active {
        background: linear-gradient(90deg, rgba(0, 243, 255, 0.1), transparent);
        border-left: 3px solid var(--primary-cyan);
        color: var(--primary-cyan);
    }

    .nav-actions {
        gap: 4px;
        flex-shrink: 0;
    }

    .support-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .theme-toggle {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .mobile-menu-btn {
        display: block;
        margin-left: 2px;
        font-size: 1.2rem;
    }

    /* Hero Fixes */
    .hero {
        padding: 2rem 1rem;
        width: 100%;
        overflow-x: hidden;
    }

    .hero h1 {
        font-size: 1.7rem;
        line-height: 1.2;
        word-break: break-word;
        padding: 0;
        margin-bottom: 0.5rem;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .hero .tagline {
        font-size: 1rem;
        padding: 0 10px;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
        text-align: center;
    }

    /* Card Grids Mobile Optimization */
    .hero-cards,
    .subjects-grid,
    .tools-grid,
    .schedule-levels-grid {
        grid-template-columns: 1fr !important;
        /* Force single column on mobile */
        padding: 0 1rem;
    }

    .schedule-list {
        padding: 0 1rem;
    }

    .schedule-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .item-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn-preview,
    .btn-download {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .glass-card {
        padding: 1.5rem;
    }

    /* Footer Fixes */
    .footer-content {
        text-align: center;
    }

    .social-links {
        gap: 1rem;
    }

    .dev-name {
        font-size: 1.1rem;
    }

    /* Modal Mobile Fixes */
    .modal-content {
        width: 95% !important;
        margin: 2vh auto !important;
        padding: 1.25rem !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    .modal-content h2 {
        font-size: 1.3rem !important;
        margin-bottom: 1.25rem !important;
    }

    .close-modal {
        top: 8px !important;
        right: 12px !important;
        font-size: 22px !important;
    }

    .resource-group {
        padding: 0.75rem !important;
        margin-bottom: 1.25rem !important;
    }

    /* Editor Mobile */
    .editor-container {
        height: 82vh !important;
        margin-bottom: 2rem !important;
    }

    .editor-header {
        flex-direction: column !important;
        padding: 0.75rem !important;
        gap: 12px !important;
        height: auto !important;
    }

    .editor-controls {
        width: 100% !important;
        justify-content: space-between !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .editor-actions {
        width: 100% !important;
        display: flex !important;
        gap: 10px !important;
        padding-top: 0 !important;
        border: none !important;
    }

    .btn-run {
        flex: 1 !important;
        justify-content: center !important;
        max-width: none !important;
    }

    .btn-icon {
        width: 44px !important;
        height: 44px !important;
        flex-shrink: 0 !important;
    }

    .lang-select {
        flex: 1 !important;
        min-width: 0 !important;
        font-size: 0.8rem !important;
    }
}

/* --- Tablet & Smaller Laptop Optimized --- */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-cards,
    .subjects-grid,
    .tools-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }

    .modal-content {
        width: 85% !important;
    }

    .editor-container {
        height: 75vh;
    }

    .editor-header {
        padding: 0.75rem 1.5rem;
        gap: 15px;
    }
}

/* Large Desktops */
@media (min-width: 1025px) {
    .container {
        max-width: 1100px;
        margin: 0 auto;
    }

    .subjects-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
    }

    .subjects-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Landscape Mode Fixes for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        margin: 1vh auto !important;
        max-height: 98vh !important;
    }

    .hero {
        padding: 1rem 0;
    }

    .navbar {
        padding: 0.5rem 5%;
    }
}

/* Extra Small Devices */
@media (max-width: 350px) {
    .logo-text {
        font-size: 0.8rem;
    }

    .support-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .resource-item span {
        font-size: 0.8rem;
    }
}

/* Output Section Mobile */
.output-header-tabs {
    padding: 0 0.75rem;
}

.output-tab {
    padding: 0 10px;
    font-size: 0.8rem;
}

.btn-clear-output {
    padding: 4px 10px;
    font-size: 0.75rem;
}

.btn-icon {
    font-size: 0.95rem;
    padding: 4px;
}

.line-numbers {
    width: 30px;
    padding: 10px 5px;
    font-size: 11px;
}

.code-area {
    font-size: 12px;
    padding: 10px;
}

.editor-output {
    height: 150px;
}

.smart-fix-container {
    padding: 0.75rem;
    /* Reduced padding */
    gap: 0.75rem;
}

.fix-card {
    padding: 0.75rem 1rem;
    /* Compact cards on mobile */
    border-radius: 12px;
}

.fix-title {
    font-size: 0.9rem;
}

.fix-explanation {
    font-size: 0.85rem;
}

.fix-suggestion {
    padding: 0.5rem;
    font-size: 0.8rem;
}

.terminal-output {
    font-size: 11px;
    padding: 10px;
}

/* Extra Small Phones */
@media (max-width: 380px) {
    .logo-text {
        font-size: 0.9rem;
    }

    .support-btn {
        padding: 0.3rem 0.6rem;
    }
}

/* Resource List Styling */

/* Student Grades Section Styles */
.grades-container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.search-box-premium {
    display: flex;
    gap: 15px;
    background: rgba(15, 23, 42, 0.6);
    padding: 1rem;
    border-radius: 50px;
    border: 1px solid rgba(0, 243, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    margin-bottom: 3rem;
}

.search-box-premium input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 0 20px;
    font-size: 1.1rem;
}

.btn-search {
    background: linear-gradient(135deg, var(--primary-cyan), #00dcff);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-search:hover {
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    transform: scale(1.05);
}

.student-info-card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    backdrop-filter: blur(15px);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-header i {
    font-size: 3.5rem;
    color: var(--primary-cyan);
}

.info-header h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 5px;
}

.gpa-badge {
    margin-left: auto;
    background: rgba(0, 255, 65, 0.1);
    color: var(--primary-green);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.2rem;
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.transcript-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
}

.summary-item .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-item .value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.grades-table-wrapper {
    overflow-x: auto;
}

.grades-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.grades-table th {
    padding: 15px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.grades-table td {
    padding: 18px 15px;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.grades-table tr:last-child td {
    border-bottom: none;
}

.grades-table .grade-a,
.grades-table .grade-م {
    color: var(--primary-green);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    font-weight: 800;
}

.grades-table .grade-b,
.grades-table .grade-ج {
    color: var(--primary-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
    font-weight: 800;
}

.grades-table .grade-f,
.grades-table .grade-ر {
    color: #ff4757;
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
    font-weight: 800;
}

/* Specific color for 'Good' if different from 'Very Good' */
.grades-table .grade-ج:contains('جيد جداً') {
    color: var(--primary-cyan);
}

.grades-table .grade-ج:not(:contains('جيد جداً')) {
    color: #00d2ff;
}

/* Note: :contains is not standard CSS, so I'll handle different colors via JS or specific classes if needed. 
   But for now, Cyan for all 'ج' (Good/Very Good) is fine. */

.placeholder-msg {
    text-align: center;
    padding: 5rem 0;
    color: var(--text-muted);
    opacity: 0.5;
}

.placeholder-msg i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

/* Light Mode Support for Grades */
.light-mode .search-box-premium,
.light-mode .student-info-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.light-mode .transcript-summary {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.light-mode .summary-item .value {
    color: #1e293b;
}

.light-mode .search-box-premium input {
    color: #1e293b;
}

.light-mode .info-header h3 {
    color: #1e293b;
}

.light-mode .grades-table td {
    color: #334155;
    border-bottom-color: #f1f5f9;
}

.light-mode .info-header {
    border-bottom-color: #f1f5f9;
}

/* Search Suggestions Auto-complete */
.input-wrapper-suggestion {
    position: relative;
    flex: 1;
    display: flex;
}

.search-suggestions-container {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    backdrop-filter: blur(20px);
}

.suggestion-item {
    padding: 12px 20px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(0, 243, 255, 0.1);
    padding-left: 25px;
}

.suggestion-item .suggestion-id {
    font-size: 0.8rem;
    color: var(--primary-cyan);
    background: rgba(0, 243, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.light-mode .search-suggestions-container {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.light-mode .suggestion-item {
    color: #1e293b;
    border-bottom-color: #f1f5f9;
}

.light-mode .suggestion-item:hover {
    background: #f0f9ff;
}

/* Responsive Grades Section */
@media (max-width: 650px) {
    .grades-container {
        margin: 1.5rem auto;
    }

    .search-box-premium {
        flex-direction: column;
        border-radius: 24px;
        padding: 1rem;
        gap: 12px;
        background: rgba(15, 23, 42, 0.9);
    }

    .search-box-premium .input-wrapper-suggestion {
        width: 100%;
    }

    .search-box-premium input {
        width: 100%;
        padding: 14px 10px;
        font-size: 1rem;
        text-align: center;
        border-bottom: 1px dashed rgba(0, 243, 255, 0.2);
        border-radius: 0;
    }

    .btn-search {
        width: 100%;
        justify-content: center;
        padding: 15px;
        border-radius: 16px;
        font-size: 1.1rem;
    }

    .student-info-card {
        padding: 1.5rem;
    }

    .info-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .info-header i {
        font-size: 3rem;
    }

    .info-header h3 {
        font-size: 1.4rem;
    }

    .gpa-badge {
        margin: 10px auto 0;
        font-size: 1rem;
        padding: 8px 16px;
    }

    /* Transform Table into Cards */
    .grades-table thead {
        display: none;
    }

    .grades-table tr {
        display: block;
        background: rgba(255, 255, 255, 0.03);
        margin-bottom: 15px;
        padding: 12px;
        border-radius: 16px;
        border: 1px solid rgba(0, 243, 255, 0.1);
    }

    .grades-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 5px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: right;
    }

    .grades-table td:last-child {
        border-bottom: none;
    }

    .grades-table td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.8rem;
        color: var(--text-muted);
        text-transform: uppercase;
        margin-right: 15px;
    }

    .suggestion-item {
        padding: 15px;
        font-size: 0.9rem;
    }
}

.flash-line-fix {
    background: rgba(35, 134, 54, 0.3) !important;
    transition: background 1s;
}

/* --- PREMIUM SUPPORT MODAL --- */
.support-card-premium {
    max-width: 450px !important;
    text-align: center;
    background: linear-gradient(145deg, #0f172a, #1a2235) !important;
    padding: 3rem 2rem !important;
    border: 1px solid rgba(0, 243, 255, 0.2) !important;
    border-radius: 24px !important;
}

.support-header {
    margin-bottom: 2rem;
}

.support-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ff4757;
    font-size: 2.2rem;
    animation: heartPulse 2s infinite ease-in-out;
    border: 1px solid rgba(255, 71, 87, 0.2);
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255, 71, 87, 0));
    }

    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 20px rgba(255, 71, 87, 0.6));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(255, 71, 87, 0));
    }
}

.support-header h2 {
    font-size: 1.8rem !important;
    color: #fff !important;
    margin-bottom: 0.8rem !important;
}

.support-header .highlight {
    color: var(--primary-cyan);
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.payment-method-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 1rem;
}

.payment-method-card:hover {
    background: rgba(0, 243, 255, 0.08);
    border-color: var(--primary-cyan);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.method-info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.method-icon-vd {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e60000, #ff3333);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 5px 15px rgba(230, 0, 0, 0.3);
}

.method-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.method-label {
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
}

.method-number {
    font-family: var(--font-code);
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.btn-copy-support {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.payment-method-card:hover .btn-copy-support {
    background: #fff;
    color: #000;
    transform: rotate(5deg);
}

.support-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.support-feedback-text {
    margin-top: 1.5rem;
    font-weight: 700;
    color: var(--primary-green) !important;
    min-height: 1.5em;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

/* Light Mode Refinements */
.light-mode .support-card-premium {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.light-mode .payment-method-card {
    background: #f1f5f9;
}

.light-mode .method-label {
    color: #0f172a;
}

.light-mode .method-number {
    color: #64748b;
}

.light-mode .support-header h2 {
    color: #0f172a !important;
}

.light-mode .support-header p {
    color: #475569;
}

.light-mode .btn-copy-support {
    color: #64748b;
}

/* --- AI SMART FIX STYLES --- */
.fix-actions {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}



.main-explanation {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: #fff;
}

.technical-msg {
    font-size: 0.85rem;
    opacity: 0.7;
    font-family: 'Consolas', monospace;
    direction: ltr;
    text-align: left;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.light-mode .main-explanation {
    color: #1e293b;
}

.light-mode .technical-msg {
    background: rgba(0, 0, 0, 0.05);
    color: #475569;
    border-color: rgba(0, 0, 0, 0.1);
}





.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    opacity: 0.5;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.admin-login-overlay .error-text {
    color: #ff4757;
    font-size: 0.85rem;
    margin-top: 10px;
    height: 20px;
}

/* Cleaned up redundant switch logic */

.slider-mini.round {
    border-radius: 20px;
}

.slider-mini.round:before {
    border-radius: 50%;
}

/* Summaries Section Styles */
.summaries-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
    /* Center cards when there are few */
}

.summary-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.1);
    padding: 2rem;
    border-radius: 28px;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: default;
    backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 280px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.summary-card:hover {
    transform: translateY(-15px);
    border-color: var(--primary-cyan);
    box-shadow: 0 25px 50px rgba(0, 243, 255, 0.15);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 243, 255, 0.15), transparent 70%);
    pointer-events: none;
    opacity: 0.5;
}

.summary-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-cyan);
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.summary-card:hover .summary-icon-box {
    transform: scale(1.1) rotate(-5deg);
    background: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.summary-details h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.summary-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.btn-summary-open {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    color: #000;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.3);
}

.btn-summary-open:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 243, 255, 0.5);
    filter: brightness(1.1);
}

.btn-summary-open i {
    font-size: 1rem;
}

@media (max-width: 600px) {
    .summary-card {
        width: 100%;
        max-width: none;
        padding: 1.5rem;
    }
}

.premium-empty {
    background: radial-gradient(circle at center, rgba(0, 243, 255, 0.05) 0%, transparent 70%);
    border: 1px solid rgba(0, 243, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.premium-empty i {
    font-size: 5rem;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    display: block;
    filter: drop-shadow(0 0 15px rgba(0, 243, 255, 0.3));
}

.premium-empty h3 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1.2rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.coming-soon-badge {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0, 243, 255, 0.05);
    color: var(--primary-cyan);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(0, 243, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    backdrop-filter: blur(5px);
}

.animate-pulse {
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(0, 243, 255, 0.3));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 25px rgba(0, 243, 255, 0.5));
    }
}

.light-mode .premium-empty {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.light-mode .premium-empty h3 {
    color: #1e293b;
}

/* Light Mode Summary Card Refinements */
.light-mode .summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.light-mode .summary-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.1);
}

.light-mode .summary-details h3 {
    color: #0f172a;
}

.light-mode .summary-details p {
    color: #64748b;
}

.light-mode .summary-icon-box {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0284c7;
}

.light-mode .card-glow {
    background: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.05), transparent 70%);
}

.light-mode .btn-summary-open {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.light-mode .btn-summary-open:hover {
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

/* =========================================
   GROUP LINKS SECTION (Premium Layout)
   ========================================= */
.subjects-group-container {
    max-width: 1000px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.2rem;
    padding: 0 1rem;
    direction: rtl;
}

.subject-group-card {
    background: rgba(16, 22, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    height: fit-content;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    /* Fix for mobile tap highlight */
}

.subject-group-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--primary-cyan);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 243, 255, 0.15);
}

.subject-group-card.active {
    border-color: var(--primary-cyan);
    box-shadow: 0 15px 30px rgba(0, 243, 255, 0.1);
}

.subject-group-header {
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.08), rgba(0, 255, 65, 0.03));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.subject-group-header i.subject-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary-cyan);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.subject-group-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    flex-grow: 1;
    /* Ensure title takes available space */
}

.toggle-chevron {
    font-size: 0.85rem;
    opacity: 0.6;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #94a3b8;
    flex-shrink: 0;
}

.subject-group-card.active .toggle-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--primary-cyan);
}

.subject-group-card.active .subject-group-header {
    background: rgba(0, 243, 255, 0.12);
}

.members-list {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subject-group-card.active .members-list {
    max-height: 1200px;
    opacity: 1;
    padding: 1.2rem 1rem;
}

/* Mobile Specific Optimizations */
@media (max-width: 600px) {
    .subjects-group-container {
        grid-template-columns: 1fr;
        padding: 0 0.8rem;
    }

    .subject-group-header {
        padding: 1rem;
    }

    .subject-group-card {
        backdrop-filter: none;
        /* Disable heavy filter on low-end mobile */
        background: rgba(20, 28, 52, 0.95);
    }

    .member-item {
        padding: 1rem;
    }
}

.member-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 18px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(15px) scale(0.98);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.subject-group-card.active .member-item {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.subject-group-card.active .member-item:nth-child(1) {
    transition-delay: 0.1s;
}

.subject-group-card.active .member-item:nth-child(2) {
    transition-delay: 0.2s;
}

.subject-group-card.active .member-item:nth-child(3) {
    transition-delay: 0.3s;
}

.subject-group-card.active .member-item:nth-child(4) {
    transition-delay: 0.4s;
}

.member-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.member-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.member-name {
    font-weight: 700;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
}

.member-name i {
    font-size: 0.95rem;
    color: var(--primary-cyan);
}

.member-type {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(0, 243, 255, 0.12);
    color: var(--primary-cyan);
    font-weight: 600;
    text-transform: uppercase;
}

.member-type.doctor {
    background: rgba(0, 255, 65, 0.12);
    color: var(--primary-green);
}

.member-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.group-btn-min {
    flex: 1;
    min-width: 130px;
    padding: 10px 15px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-wa-min {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-wa-min:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
    filter: brightness(1.1);
}

.btn-tg-min {
    background: linear-gradient(135deg, #0088cc, #005588);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.2);
}

.btn-tg-min:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 136, 204, 0.4);
    filter: brightness(1.1);
}

/* Light Mode Overrides for Group Links */
.light-mode .subject-group-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.light-mode .subject-group-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

.light-mode .subject-group-header {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom-color: #f1f5f9;
}

.light-mode .subject-group-card.active .subject-group-header {
    background: linear-gradient(135deg, #f0f9ff, #f0fdf4);
}

.light-mode .subject-group-header h3 {
    color: #0f172a;
    font-weight: 700;
}

.light-mode .subject-group-header i.subject-icon {
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    color: #0284c7;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.08);
}

.light-mode .toggle-chevron {
    color: #64748b;
}

.light-mode .subject-group-card.active .toggle-chevron {
    color: #0ea5e9;
}

.light-mode .member-item {
    background: #f8fafc;
    border-color: #f1f5f9;
}

.light-mode .member-item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.light-mode .member-name {
    color: #1e293b;
}

.light-mode .member-type {
    background: #eff6ff;
    color: #3b82f6;
}

.light-mode .member-type.doctor {
    background: #f0fdf4;
    color: #22c55e;
}

/* Toast Notifications - Premium Style */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    right: auto;
    width: max-content;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    animation: toastIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.toast-notification.fade-out {
    animation: toastOut 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-notification i {
    color: var(--primary-cyan);
    font-size: 1.1rem;
}

.toast-notification.error {
    border-color: #ff4757;
    background: rgba(40, 10, 10, 0.9);
}

.toast-notification.error i {
    color: #ff4757;
}

@keyframes toastIn {
    to {
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastOut {
    to {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
}

.light-mode .toast-notification {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}

/* Search Suggestions */
.search-suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 15px;
    margin-top: 10px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: none;
    text-align: left;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(0, 243, 255, 0.1);
}

.sug-name {
    font-weight: 600;
    color: #fff;
}

.sug-id {
    font-size: 0.8rem;
    color: var(--primary-cyan);
    font-family: var(--font-code);
}

.light-mode .search-suggestions-container {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.light-mode .suggestion-item {
    border-bottom-color: #f1f5f9;
}

.light-mode .sug-name {
    color: #1e293b;
}

.light-mode .suggestion-item:hover {
    background: #f0f9ff;
}
