@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Fredoka:wght@500;700;800&family=Alexandria:wght@400;700;900&family=Orbitron:wght@700;900&family=Bangers&display=swap');

:root {
    /* Spider-Man Hero Color Palette */
    --primary: #e62429;          /* Spider Crimson Red */
    --primary-dark: #b30006;     /* Deep Marvel Red */
    --primary-light: #ff3344;    /* Glowing Neon Red */
    --secondary: #0066cc;        /* Spider Blue */
    --secondary-dark: #03194a;   /* Midnight Hero Blue */
    --secondary-light: #00b4d8;  /* Electric Blue */
    --accent: #ffd60a;           /* Spider-Sense Gold */
    --accent-glow: #ffe066;      /* Golden Glow */
    --accent-cyan: #00f0ff;      /* Web Glow Cyan */
    --dark: #080a14;             /* Dark Web Night */
    
    --card-bg: linear-gradient(135deg, rgba(14, 21, 46, 0.94) 0%, rgba(8, 12, 28, 0.98) 100%);
    --card-border: rgba(230, 36, 41, 0.45);
    --card-border-hover: #00f0ff;
    
    --text-main: #ffffff;
    --text-light: #bde0fe;
    --text-muted: #8ecae6;
    --white: #ffffff;
    --success: #00f0ff;
    --warning: #ffd60a;

    --spidey-glow: 0 0 25px rgba(230, 36, 41, 0.8), 0 0 45px rgba(0, 102, 204, 0.5);
    --gold-glow: 0 0 20px rgba(255, 214, 10, 0.85), 0 0 35px rgba(255, 214, 10, 0.45);
    --blue-glow: 0 0 20px rgba(0, 102, 204, 0.8), 0 0 35px rgba(0, 240, 255, 0.45);
    --shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    --shadow-hover: 0 18px 45px rgba(230, 36, 41, 0.6), 0 0 30px rgba(0, 240, 255, 0.4);
    --radius: 26px;

    --font-ar: 'Cairo', 'Alexandria', sans-serif;
    --font-en: 'Fredoka', 'Cairo', sans-serif;
    --font-digital: 'Orbitron', 'Courier New', monospace;
    --font-comic: 'Bangers', 'Cairo', sans-serif;
}

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

body {
    font-family: var(--font-ar);
    background-color: var(--dark);
    color: var(--text-main);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 15% 30%, rgba(230, 36, 41, 0.35), transparent 500px),
        radial-gradient(circle at 85% 70%, rgba(0, 102, 204, 0.4), transparent 550px),
        radial-gradient(circle at 50% 50%, rgba(255, 214, 10, 0.1), transparent 600px),
        url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M60 0 L60 120 M0 60 L120 60 M0 0 L120 120 M120 0 L0 120' stroke='rgba(255, 255, 255, 0.05)' stroke-width='1'/%3E%3Cpolygon points='60,20 95,60 60,100 25,60' fill='none' stroke='rgba(0, 240, 255, 0.07)' stroke-width='1'/%3E%3Cpolygon points='60,40 75,60 60,80 45,60' fill='none' stroke='rgba(230, 36, 41, 0.08)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: auto, auto, auto, 120px 120px;
    background-attachment: fixed;
    animation: breathingBackground 16s ease-in-out infinite alternate;
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
}

@keyframes breathingBackground {
    0% { background-position: 0% 0%, 0% 0%, 0% 0%, 0 0; }
    100% { background-position: 5% 5%, -5% 5%, 0% 5%, 0 40px; }
}

/* =========================================================
   Spider-Man Header & Navbar
========================================================= */
.fairy-header, .app-header {
    background: linear-gradient(135deg, rgba(14, 21, 46, 0.95) 0%, rgba(8, 10, 24, 0.98) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 35px rgba(230, 36, 41, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(230, 36, 41, 0.6);
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
    width: 100%;
    transition: all 0.35s ease;
}

/* =========================================================
   Lesson Mode Header (يختفي الهيدر ويبقى فقط صورة البروفايل وزر الكتب)
========================================================= */
.fairy-header.lesson-header-mode {
    padding: 0.4rem 1.8rem;
    min-height: 56px;
    background: linear-gradient(135deg, rgba(14, 21, 46, 0.88) 0%, rgba(8, 10, 24, 0.94) 100%);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 15px rgba(230, 36, 41, 0.25);
    border-bottom: 1.5px solid rgba(230, 36, 41, 0.4);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* Hide student name & grade pill in lesson mode, keeping only the profile picture */
.fairy-header.lesson-header-mode .user-info-text {
    display: none !important;
}

/* Compact avatar glow in lesson mode */
.fairy-header.lesson-header-mode .user-avatar-glow {
    width: 50px;
    height: 50px;
    border-width: 2px;
}

.fairy-header.lesson-header-mode .avatar-fairy-badge {
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    bottom: -2px;
    left: -2px;
}

/* Hide center title & subtitle in lesson mode */
.fairy-header.lesson-header-mode .fairy-header-center {
    display: none !important;
}

/* In header-actions: Hide all buttons EXCEPT the Books button (#homeBtn) */
.fairy-header.lesson-header-mode .header-actions > *:not(#homeBtn) {
    display: none !important;
}

/* Ensure Books button is styled and visible in lesson mode */
.fairy-header.lesson-header-mode #homeBtn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 0.95rem;
    font-weight: 900;
    border-radius: 50px;
    border: 2px solid #00f0ff;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
    background: linear-gradient(135deg, #0066cc, #03194a);
    color: #ffffff;
    cursor: pointer;
}

.fairy-header.lesson-header-mode #homeBtn:hover {
    background: linear-gradient(135deg, #e62429, #b30006);
    border-color: #ffd60a;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 18px rgba(230, 36, 41, 0.7);
}

/* Student Profile */
.user-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-glow {
    position: relative;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: radial-gradient(circle, #e62429 0%, #0066cc 100%);
    border: 2.5px solid #ffd60a;
    box-shadow: 0 0 18px rgba(255, 214, 10, 0.75), 0 0 28px rgba(230, 36, 41, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.user-avatar-glow:hover {
    transform: scale(1.1) rotate(4deg);
    box-shadow: 0 0 25px rgba(255, 214, 10, 0.95), 0 0 40px rgba(230, 36, 41, 0.9);
}

.user-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.avatar-fairy-badge {
    position: absolute;
    bottom: -4px;
    left: -4px;
    background: #e62429;
    border: 1.5px solid #ffd60a;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.student-name {
    font-size: 1.3rem;
    font-weight: 900;
    color: #FFFFFF;
    text-shadow: 0 0 12px rgba(230, 36, 41, 0.9);
    margin: 0;
    line-height: 1.2;
}

.student-grade-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #ffd60a;
    background: rgba(0, 102, 204, 0.6);
    border: 1px solid rgba(255, 214, 10, 0.5);
    border-radius: 20px;
    padding: 2px 10px;
    margin-top: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Center Hero Title */
.fairy-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.magical-title {
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #ff8080 30%, #ffd60a 70%, #00f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(230, 36, 41, 0.5);
    font-weight: 900;
    line-height: 1.2;
}

.magical-subtitle {
    font-size: 0.85rem;
    color: #bde0fe;
    margin: 3px 0 0 0;
    font-weight: 600;
}

/* Actions / Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-play-fairies, .dragon-game-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #e62429 0%, #0066cc 100%);
    color: #FFFFFF !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-weight: 900;
    font-size: 0.95rem;
    box-shadow: 0 4px 18px rgba(230, 36, 41, 0.6), 0 0 16px rgba(0, 102, 204, 0.4);
    border: 2px solid #ffd60a;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-play-fairies:hover, .dragon-game-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, #0066cc 0%, #e62429 100%);
    box-shadow: 0 8px 25px rgba(230, 36, 41, 0.8), 0 0 25px rgba(255, 214, 10, 0.6);
    border-color: #00f0ff;
}

.fairy-btn-icon {
    font-size: 1.25rem;
    animation: spideyWiggle 2.5s infinite ease-in-out;
}

@keyframes spideyWiggle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(12deg) scale(1.15); }
}

.fairy-sparkle-star {
    color: #ffd60a;
    animation: spideyGlowStar 1.5s infinite alternate;
}

@keyframes spideyGlowStar {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.3); opacity: 1; text-shadow: 0 0 10px #ffd60a; }
}

.btn-magical-back, .back-to-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(13, 20, 42, 0.85);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1.5px solid rgba(0, 102, 204, 0.7);
    transition: all 0.25s ease;
}

.btn-magical-back:hover, .back-to-main:hover {
    background: rgba(0, 102, 204, 0.8);
    border-color: #00f0ff;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.home-btn, .back-btn {
    background: linear-gradient(135deg, #0066cc, #03194a);
    color: #ffffff;
    border: 1.5px solid #00f0ff;
    padding: 8px 18px;
    border-radius: 18px;
    cursor: pointer;
    font-family: var(--font-ar);
    font-weight: bold;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.home-btn:hover, .back-btn:hover {
    background: linear-gradient(135deg, #e62429, #b30006);
    border-color: #ffd60a;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 18px rgba(230, 36, 41, 0.7);
}

/* =========================================================
   Spider-Man Magic Screen Effects & 7s Celebration
========================================================= */
.magic-glow-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, rgba(230, 36, 41, 0.25) 0%, rgba(0, 102, 204, 0.25) 50%, rgba(8, 10, 20, 0.4) 100%);
    pointer-events: none;
    z-index: 999;
    animation: spideyAuraSurge 1.4s infinite alternate ease-in-out;
    transition: opacity 0.7s ease;
}

@keyframes spideyAuraSurge {
    0% { opacity: 0.7; transform: scale(1); filter: drop-shadow(0 0 20px #e62429); }
    100% { opacity: 1; transform: scale(1.02); filter: drop-shadow(0 0 40px #00f0ff); }
}

.user-avatar-glow.magic-active {
    animation: spideyRoyalRing 1.1s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95) !important;
    border-color: #00f0ff !important;
}

@keyframes spideyRoyalRing {
    0% {
        box-shadow: 0 0 30px #e62429, 0 0 60px #0066cc, 0 0 90px #ffd60a;
        transform: scale(1.15) rotate(-5deg);
    }
    100% {
        box-shadow: 0 0 45px #00f0ff, 0 0 80px #e62429, 0 0 120px #ffd60a;
        transform: scale(1.22) rotate(5deg);
    }
}

.magic-platform-dancing {
    animation: spideyPlatformBounce 1.4s infinite ease-in-out alternate;
}

@keyframes spideyPlatformBounce {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(2px); }
}

.magic-sparkle-card {
    animation: spideyCardShimmer 1.2s infinite alternate !important;
}

@keyframes spideyCardShimmer {
    0% { border-color: #e62429; box-shadow: 0 0 20px rgba(230, 36, 41, 0.7); }
    100% { border-color: #00f0ff; box-shadow: 0 0 35px rgba(0, 240, 255, 0.85), 0 0 50px rgba(255, 214, 10, 0.6); }
}

/* Dancing Floating Spider Stickers & Particles */
.dancing-flower-particle, .spidey-particle {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    display: inline-block;
    will-change: transform, opacity;
    animation: spideyFloatAway 3.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    filter: drop-shadow(0 0 12px rgba(230, 36, 41, 0.9));
}

.spidey-sticker-img {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    overflow: hidden;
    object-fit: cover;
    border: 2.5px solid #ffd60a;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.9), 0 0 25px rgba(230, 36, 41, 0.8);
}

@keyframes spideyFloatAway {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.4) rotate(0deg);
    }
    15% {
        opacity: 1;
        transform: translate(calc(var(--tx) * 0.25), calc(var(--ty) * 0.25)) scale(var(--scale)) rotate(calc(var(--rot) * 0.25));
    }
    70% {
        opacity: 1;
        transform: translate(calc(var(--tx) + var(--sway)), calc(var(--ty) - 80px)) scale(var(--scale)) rotate(var(--rot));
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--tx) + (var(--sway) * 2)), calc(var(--ty) - 180px)) scale(calc(var(--scale) * 0.7)) rotate(calc(var(--rot) * 1.5));
    }
}

/* =========================================================
   Layout & Views
========================================================= */
main {
    flex: 1;
    max-width: 1200px;
    width: 95%;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.view {
    display: none;
    animation: spideyFadeIn 0.35s ease-out;
}

.view.active {
    display: block;
}

.hidden {
    display: none !important;
}

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

.view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(230, 36, 41, 0.4);
}

.view-header h2 {
    font-size: 1.8rem;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(255, 214, 10, 0.6);
}

.main-title {
    text-align: center;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    margin: 1.5rem 0 0.5rem 0;
    color: #ffffff;
    font-weight: 900;
    text-shadow: 0 0 25px rgba(230, 36, 41, 0.8), 0 0 45px rgba(0, 102, 204, 0.6);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.main-title:hover {
    transform: scale(1.02);
}

.subtitle {
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    cursor: pointer;
    font-weight: 600;
}

/* =========================================================
   PROFESSIONAL HERO CARDS: Book Selection Dashboard
========================================================= */
.book-selection-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    margin: 2.5rem 0;
}

.book-card {
    background: linear-gradient(135deg, rgba(16, 24, 52, 0.95) 0%, rgba(8, 12, 28, 0.98) 100%);
    border: 2.5px solid rgba(230, 36, 41, 0.55);
    border-radius: 28px;
    padding: 2.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), inset 0 0 25px rgba(0, 102, 204, 0.2);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: visible;
    text-align: right;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 5px;
    border-top-left-radius: 26px;
    border-top-right-radius: 26px;
    background: linear-gradient(90deg, #e62429, #ffd60a, #0066cc, #00f0ff);
}

.book-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #00f0ff;
    box-shadow: 0 20px 50px rgba(230, 36, 41, 0.55), 0 0 35px rgba(0, 240, 255, 0.5);
}

.book-card-char-stage {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffd60a;
    box-shadow: 0 0 22px rgba(230, 36, 41, 0.7), 0 0 35px rgba(0, 102, 204, 0.5), 0 10px 25px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d142a;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.book-card-char-stage::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 45%, transparent 60%);
    pointer-events: none;
    z-index: 3;
}

.book-card:hover .book-card-char-stage {
    transform: scale(1.08) rotate(3deg);
    border-color: #00f0ff;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.85), 0 0 45px rgba(230, 36, 41, 0.6);
}

.book-card-char-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    position: relative;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.book-card:hover .book-card-char-img {
    transform: scale(1.14);
}

.book-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.book-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    background: rgba(230, 36, 41, 0.3);
    border: 1px solid #ffd60a;
    color: #ffd60a;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.book-card-info h2 {
    font-size: 1.85rem;
    color: #ffffff;
    font-family: var(--font-en);
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 0 15px rgba(230, 36, 41, 0.7);
}

.book-card-info p {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 700;
    margin: 0;
}

.book-card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    margin-top: 8px;
    background: linear-gradient(135deg, #e62429 0%, #0066cc 100%);
    border: 1.5px solid #ffd60a;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(230, 36, 41, 0.5);
    transition: all 0.25s ease;
}

.book-card:hover .book-card-action-btn {
    background: linear-gradient(135deg, #0066cc 0%, #e62429 100%);
    border-color: #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.7);
    transform: translateX(-4px);
}

/* =========================================================
   PROFESSIONAL HERO CARDS: Units Grid
========================================================= */
.lessons-grid-container, .units-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.unit-card {
    background: linear-gradient(135deg, rgba(16, 24, 52, 0.94) 0%, rgba(8, 12, 28, 0.98) 100%);
    border: 2px solid rgba(0, 102, 204, 0.5);
    border-radius: 26px;
    padding: 1.8rem 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: visible;
}

.unit-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    background: linear-gradient(90deg, #e62429, #ffd60a, #0066cc);
}

.unit-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #00f0ff;
    box-shadow: 0 18px 45px rgba(0, 102, 204, 0.65), 0 0 30px rgba(0, 240, 255, 0.5);
}

.unit-char-stage {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.2rem auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3.5px solid #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.65), 0 0 30px rgba(0, 102, 204, 0.4), 0 8px 20px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #080c1c;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.unit-char-stage::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 45%, transparent 60%);
    pointer-events: none;
    z-index: 3;
}

.unit-card:hover .unit-char-stage {
    transform: scale(1.1) rotate(-3deg);
    border-color: #ffd60a;
    box-shadow: 0 0 25px rgba(255, 214, 10, 0.85), 0 0 35px rgba(230, 36, 41, 0.6);
}

.unit-char-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    position: relative;
    z-index: 2;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.unit-card:hover .unit-char-img {
    transform: scale(1.14);
}

.unit-card .unit-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.35;
    text-shadow: 0 0 10px rgba(0, 102, 204, 0.6);
}

.unit-card .unit-action-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 102, 204, 0.35);
    border: 1px solid rgba(0, 240, 255, 0.45);
    border-radius: 16px;
    padding: 8px 16px;
    color: #ffd60a;
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.unit-card:hover .unit-action-bar {
    background: linear-gradient(135deg, #e62429, #0066cc);
    border-color: #00f0ff;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.65);
}

/* =========================================================
   PROFESSIONAL HERO CARDS: Lessons List
========================================================= */
.lesson-car-btn {
    background: linear-gradient(135deg, rgba(16, 24, 52, 0.94) 0%, rgba(8, 12, 28, 0.98) 100%);
    border: 2px solid rgba(230, 36, 41, 0.5);
    border-radius: 22px;
    padding: 1.4rem 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.65);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: visible;
    text-align: right;
}

.lesson-car-btn:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: #00f0ff;
    box-shadow: 0 16px 40px rgba(230, 36, 41, 0.55), 0 0 28px rgba(0, 240, 255, 0.5);
}

.lesson-char-stage {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ffd60a;
    box-shadow: 0 0 16px rgba(255, 214, 10, 0.6), 0 4px 15px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #080c1c;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lesson-char-stage::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 45%, transparent 60%);
    pointer-events: none;
    z-index: 3;
}

.lesson-car-btn:hover .lesson-char-stage {
    transform: scale(1.12) rotate(3deg);
    border-color: #00f0ff;
    box-shadow: 0 0 22px rgba(0, 240, 255, 0.85);
}

.lesson-char-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    position: relative;
    z-index: 2;
    transition: transform 0.35s ease;
}

.lesson-car-btn:hover .lesson-char-img {
    transform: scale(1.14);
}

.lesson-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lesson-tag {
    font-size: 0.8rem;
    font-family: var(--font-digital);
    color: #ffd60a;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.lesson-title-text {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.lesson-cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    background: rgba(0, 102, 204, 0.4);
    border: 1px solid #ffd60a;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.lesson-car-btn:hover .lesson-cta-pill {
    background: linear-gradient(135deg, #e62429, #0066cc);
    border-color: #00f0ff;
    transform: translateX(-4px);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
}

/* =========================================================
   PROFESSIONAL HERO CARDS: Games Menu
========================================================= */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.game-card {
    background: linear-gradient(135deg, rgba(16, 24, 52, 0.95) 0%, rgba(8, 12, 28, 0.98) 100%);
    border: 2px solid rgba(230, 36, 41, 0.5);
    border-radius: 26px;
    padding: 1.8rem 1.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: visible;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: #00f0ff;
    box-shadow: 0 18px 45px rgba(230, 36, 41, 0.65), 0 0 30px rgba(0, 240, 255, 0.5);
}

.game-char-stage {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 1.1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-char-circle-badge {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3.5px solid #e62429;
    box-shadow: 0 0 20px rgba(230, 36, 41, 0.7), 0 0 30px rgba(255, 214, 10, 0.4), 0 8px 20px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #080c1c;
    position: relative;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-char-circle-badge::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 45%, transparent 60%);
    pointer-events: none;
    z-index: 3;
}

.game-card:hover .game-char-circle-badge {
    transform: scale(1.1) rotate(3deg);
    border-color: #00f0ff;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.9), 0 0 35px rgba(230, 36, 41, 0.6);
}

.game-card-svg {
    width: 90%;
    height: 90%;
    display: block;
    position: relative;
    z-index: 2;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.game-card:hover .game-card-svg {
    transform: scale(1.12) rotate(3deg);
    filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.85));
}

.game-type-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 4;
    background: linear-gradient(135deg, #e62429, #0066cc);
    border: 2px solid #ffd60a;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7), 0 0 10px rgba(255, 214, 10, 0.6);
}

.game-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.4rem;
    text-shadow: 0 0 10px rgba(230, 36, 41, 0.6);
}

.game-card p {
    font-size: 0.92rem;
    color: var(--text-light);
    margin-bottom: 0.9rem;
}

.game-play-btn {
    width: 100%;
    background: linear-gradient(135deg, #e62429 0%, #0066cc 100%);
    border: 1.5px solid #ffd60a;
    color: #ffffff;
    padding: 9px 18px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(230, 36, 41, 0.45);
    transition: all 0.25s ease;
}

.game-card:hover .game-play-btn {
    background: linear-gradient(135deg, #0066cc 0%, #e62429 100%);
    border-color: #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.7);
}

/* =========================================================
   Lesson Content & Section Boxes
========================================================= */
.lesson-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.lesson-section, .section-box {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.section-title {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid rgba(230, 36, 41, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 12px rgba(255, 214, 10, 0.6);
}

.section-description {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

.en-text {
    font-family: var(--font-en);
    direction: ltr;
    text-align: left;
}

/* Characters Conversation Bubbles */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.char-card {
    background: rgba(8, 12, 26, 0.75);
    border: 1.5px solid rgba(0, 102, 204, 0.5);
    border-radius: 18px;
    padding: 1.2rem;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: transform 0.2s ease;
}

.char-card:hover {
    transform: translateY(-3px);
    border-color: #00f0ff;
}

.char-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.char-bubble {
    flex: 1;
}

.char-text, .clickable-text {
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.char-text:hover, .clickable-text:hover {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent);
}

.inline-ar-trans {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Vocabulary Grid */
.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}

.vocab-card, .vocab-item {
    background: rgba(13, 20, 42, 0.8);
    border: 1.5px solid rgba(230, 36, 41, 0.4);
    border-radius: 16px;
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.vocab-card:hover, .vocab-item:hover {
    background: rgba(0, 102, 204, 0.3);
    border-color: #00f0ff;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.4);
}

.vocab-en {
    font-family: var(--font-en);
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.vocab-ar {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
}

/* Grammar Table */
.grammar-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border-radius: 14px;
    overflow: hidden;
}

.grammar-table th {
    background: linear-gradient(135deg, #e62429, #0066cc);
    color: #ffffff;
    padding: 12px;
    font-size: 1.1rem;
}

.grammar-table td {
    background: rgba(8, 12, 26, 0.7);
    padding: 12px;
    border-bottom: 1px solid rgba(230, 36, 41, 0.2);
    color: #ffffff;
}

.grammar-example {
    background: rgba(0, 102, 204, 0.2);
    border-right: 4px solid var(--accent);
    padding: 10px 14px;
    margin: 8px 0;
    border-radius: 8px;
    color: #ffffff;
}

/* Quiz & Options */
.quiz-question {
    background: rgba(8, 12, 26, 0.8);
    border: 1.5px solid rgba(230, 36, 41, 0.4);
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.q-text {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 700;
}

.q-option, .quiz-option-btn {
    display: block;
    width: 100%;
    text-align: right;
    background: rgba(13, 20, 42, 0.9);
    border: 1.5px solid rgba(0, 102, 204, 0.5);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    font-family: var(--font-ar);
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.q-option:hover, .quiz-option-btn:hover {
    background: rgba(0, 102, 204, 0.4);
    border-color: #00f0ff;
    transform: translateX(-4px);
}

.q-option.correct, .quiz-option-btn.correct {
    background: rgba(0, 240, 255, 0.3) !important;
    border-color: #00f0ff !important;
    color: #00f0ff !important;
    font-weight: bold;
}

.q-option.wrong, .quiz-option-btn.wrong {
    background: rgba(230, 36, 41, 0.3) !important;
    border-color: #e62429 !important;
    color: #ff3344 !important;
}

/* Play & Learn button inside lesson */
.spidey-play-learn-btn, .butterfly-play-learn-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #e62429 0%, #0066cc 100%);
    border: 2.5px solid #ffd60a;
    border-radius: 50px;
    padding: 12px 32px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(230, 36, 41, 0.6), 0 0 20px rgba(0, 102, 204, 0.5);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: var(--font-ar);
}

.spidey-play-learn-btn:hover, .butterfly-play-learn-btn:hover {
    transform: scale(1.06) translateY(-3px);
    background: linear-gradient(135deg, #0066cc 0%, #e62429 100%);
    border-color: #00f0ff;
    box-shadow: 0 10px 35px rgba(230, 36, 41, 0.8), 0 0 30px rgba(0, 240, 255, 0.7);
}

/* Idea (فكرة) button directly under Play & Learn button */
.spidey-idea-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(16, 26, 60, 0.95), rgba(8, 14, 36, 0.95));
    border: 2.2px solid #ffd60a;
    border-radius: 50px;
    padding: 10px 28px;
    color: #ffd60a;
    font-size: 1.15rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 214, 10, 0.3), 0 0 15px rgba(0, 240, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: var(--font-ar);
    margin-top: 10px;
}

.spidey-idea-btn:hover {
    transform: scale(1.05) translateY(-2px);
    background: linear-gradient(135deg, rgba(230, 36, 41, 0.35), rgba(0, 102, 204, 0.35));
    border-color: #00f0ff;
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.5), 0 0 20px rgba(255, 214, 10, 0.6);
}

.spidey-idea-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    border-color: #ffd60a;
    box-shadow: 0 0 25px rgba(255, 214, 10, 0.6);
}

.lesson-idea-collapsible-wrapper {
    width: 100%;
    max-width: 820px;
    margin: 18px auto 25px auto;
    transition: all 0.4s ease;
}

/* =========================================================
   Spidey Web Translator Bot
========================================================= */
#translator-bot-container {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 1000;
    direction: rtl;
}

#translator-fab {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e62429, #0066cc);
    border: 2.5px solid #ffd60a;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(230, 36, 41, 0.7), 0 0 20px rgba(0, 102, 204, 0.6);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

#translator-fab:hover {
    transform: scale(1.12) rotate(15deg);
    border-color: #00f0ff;
    box-shadow: 0 10px 35px rgba(0, 240, 255, 0.8);
}

#translator-chat-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 340px;
    height: 440px;
    background: rgba(13, 20, 42, 0.96);
    border: 2px solid #e62429;
    border-radius: 22px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8), 0 0 30px rgba(230, 36, 41, 0.5);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: spideyBotPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.chat-header {
    background: linear-gradient(135deg, #e62429, #0066cc);
    color: #ffffff;
    padding: 12px 16px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid #ffd60a;
}

.chat-body {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
    position: relative;
}

.bot-message {
    align-self: flex-start;
    background: rgba(0, 102, 204, 0.35);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: #ffffff;
    border-top-right-radius: 4px;
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #e62429, #b30006);
    color: #ffffff;
    border-top-left-radius: 4px;
    border: 1px solid #ffd60a;
}

.chat-input-area {
    padding: 10px;
    background: rgba(8, 12, 26, 0.9);
    border-top: 1px solid rgba(230, 36, 41, 0.4);
    display: flex;
    gap: 8px;
}

.chat-input-area input {
    flex: 1;
    background: rgba(13, 20, 42, 0.9);
    border: 1px solid rgba(0, 102, 204, 0.6);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 12px;
    font-family: var(--font-ar);
    outline: none;
}

.chat-input-area input:focus {
    border-color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.chat-input-area button {
    background: linear-gradient(135deg, #e62429, #0066cc);
    color: #ffffff;
    border: 1px solid #ffd60a;
    border-radius: 12px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: bold;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(14, 21, 46, 0.96), rgba(8, 12, 28, 0.98));
    border: 2px solid #e62429;
    color: #ffd60a;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(230, 36, 41, 0.6);
    z-index: 10000;
    animation: spideyToastIn 0.3s ease-out;
    text-align: center;
    backdrop-filter: blur(12px);
}

@keyframes spideyToastIn {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================================================
   Interactive Story Maker & Coloring
========================================================= */
.story-maker-container {
    background: rgba(13, 20, 42, 0.7);
    border: 2px dashed rgba(230, 36, 41, 0.5);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.story-toggle-btn {
    background: linear-gradient(135deg, #e62429, #0066cc);
    color: #ffffff;
    border: 2px solid #ffd60a;
    border-radius: 30px;
    padding: 10px 24px;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: var(--font-ar);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 36, 41, 0.5);
    transition: all 0.25s ease;
}

.story-toggle-btn:hover {
    transform: scale(1.04);
    border-color: #00f0ff;
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.6);
}

.story-output {
    background: rgba(8, 12, 26, 0.9);
    border: 1.5px solid #00f0ff;
    border-radius: 18px;
    padding: 1.5rem;
    margin-top: 1rem;
    color: #ffffff;
    line-height: 1.8;
}

/* =========================================================
   SPIDER-MAN HERO GAMES ENGINE STYLING
========================================================= */
/* =========================================================
   SPIDER-MAN HERO GAMES ENGINE STYLING (V2 - Interactive & AAA)
========================================================= */
.game-area {
    background: linear-gradient(135deg, rgba(14, 21, 46, 0.98) 0%, rgba(8, 12, 28, 0.99) 100%);
    border: 2.5px solid #e62429;
    border-radius: 28px;
    padding: 1.8rem 1.6rem;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(230, 36, 41, 0.35);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
    transition: transform 0.2s ease;
}

.game-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, #e62429, #ffd60a, #0066cc, #00f0ff);
}

/* Screen Shake Effect */
.spidey-screen-shake {
    animation: screenRumble 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screenRumble {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(3px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
    40%, 60% { transform: translate3d(5px, 0, 0); }
}

/* --- Top Modern HUD V2 --- */
.game-hud-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid rgba(0, 102, 204, 0.35);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

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

.hud-center {
    flex: 1;
    min-width: 180px;
    max-width: 320px;
}

.hud-exit-btn {
    background: rgba(230, 36, 41, 0.2);
    border: 1.5px solid #e62429;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--font-ar);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.hud-exit-btn:hover {
    background: #e62429;
    box-shadow: 0 0 12px rgba(230, 36, 41, 0.7);
    transform: scale(1.05);
}

.hud-hearts {
    display: flex;
    gap: 6px;
    font-size: 1.4rem;
}

.shield-icon.active {
    filter: drop-shadow(0 0 8px #00f0ff);
    transition: transform 0.3s ease;
}

.shield-icon.broken {
    opacity: 0.25;
    filter: grayscale(1);
}

.hud-quest-tracker {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffd60a;
    font-family: var(--font-ar);
    margin-bottom: 6px;
    text-shadow: 0 0 10px rgba(255, 214, 10, 0.5);
}

.hud-progress-track {
    width: 100%;
    height: 10px;
    background: rgba(8, 12, 28, 0.9);
    border: 1.5px solid #00f0ff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8);
}

.hud-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00f0ff, #ffd60a);
    border-radius: 20px;
    transition: width 0.4s ease;
    box-shadow: 0 0 12px #00f0ff;
}

.hud-combo-badge {
    background: linear-gradient(135deg, #ff9e00, #e62429);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 0.95rem;
    border: 1.5px solid #ffd60a;
    box-shadow: 0 0 15px rgba(255, 158, 0, 0.8);
    letter-spacing: 1px;
}

.hud-score-pill {
    background: rgba(8, 12, 28, 0.9);
    border: 1.5px solid #ffd60a;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 12px rgba(255, 214, 10, 0.3);
}

.hud-score-star {
    font-size: 1.1rem;
    color: #ffd60a;
}

.hud-score-val {
    font-size: 1.1rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-en);
}

/* --- Question Stage --- */
.game-question-stage {
    margin: 1.2rem 0 1.8rem 0;
}

.game-question-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.85rem;
    font-family: var(--font-en);
    font-weight: 800;
    color: #ffffff;
    cursor: pointer;
    padding: 10px 22px;
    border-radius: 20px;
    background: rgba(13, 20, 44, 0.6);
    border: 1.5px solid rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
    transition: all 0.25s ease;
}

.game-question-text:hover {
    transform: scale(1.02);
    border-color: #ffd60a;
    box-shadow: 0 0 25px rgba(255, 214, 10, 0.5);
}

.speaker-wave-btn {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px #ffd60a);
}

.audio-speaking-active {
    border-color: #00f0ff !important;
    animation: audioPulseWave 1s infinite alternate;
}

@keyframes audioPulseWave {
    from { box-shadow: 0 0 15px #00f0ff; }
    to { box-shadow: 0 0 35px #00f0ff, 0 0 50px rgba(230, 36, 41, 0.6); }
}

.question-translation {
    font-size: 1.2rem;
    color: #ffd60a;
    margin-top: 10px;
    font-family: var(--font-ar);
    font-weight: 700;
    text-shadow: 0 0 12px rgba(255, 214, 10, 0.5);
}

.game-instruction-hint {
    color: #bde0fe;
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 18px;
    text-shadow: 0 0 10px rgba(0, 102, 204, 0.6);
    font-family: var(--font-ar);
}

/* Primary Action Button Hero */
.action-btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #e62429 0%, #0066cc 100%);
    border: 2.5px solid #ffd60a;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 900;
    font-family: var(--font-ar);
    padding: 12px 32px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(230, 36, 41, 0.6), 0 0 20px rgba(255, 214, 10, 0.4);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-btn-hero:hover {
    transform: translateY(-3px) scale(1.04);
    background: linear-gradient(135deg, #0066cc 0%, #e62429 100%);
    border-color: #00f0ff;
    box-shadow: 0 12px 35px rgba(0, 240, 255, 0.8), 0 0 30px rgba(230, 36, 41, 0.7);
}

/* --- Floating Particle & Score Effects --- */
.spidey-game-particle {
    position: fixed;
    font-size: 1.6rem;
    pointer-events: none;
    z-index: 100000;
    animation: particleFlyOut 0.85s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes particleFlyOut {
    0% { transform: translate(0, 0) scale(0.6) rotate(0deg); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(1.3) rotate(var(--rot)); opacity: 0; }
}

.spidey-floating-score {
    position: fixed;
    font-family: var(--font-en);
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffd60a;
    text-shadow: 0 0 12px #ffd60a, 0 0 20px #e62429;
    pointer-events: none;
    z-index: 100001;
    animation: floatScoreUp 0.95s ease-out forwards;
}

.spidey-floating-score.combo-score {
    color: #00f0ff;
    font-size: 1.6rem;
    text-shadow: 0 0 15px #00f0ff, 0 0 25px #ffd60a;
}

@keyframes floatScoreUp {
    0% { transform: translate(-50%, 0) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -60px) scale(1.2); opacity: 0; }
}

/* --- Superhero Coaching Card on Mistake --- */
.hero-learning-card {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 520px;
    background: linear-gradient(135deg, rgba(20, 10, 30, 0.98), rgba(8, 12, 28, 0.98));
    border: 2px solid #00f0ff;
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 240, 255, 0.5);
    z-index: 1000;
    backdrop-filter: blur(16px);
}

.coaching-header {
    font-size: 1.1rem;
    font-weight: 900;
    color: #ffd60a;
    font-family: var(--font-ar);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.coaching-body {
    color: #ffffff;
    font-size: 1.2rem;
    font-family: var(--font-ar);
    font-weight: 700;
    margin-bottom: 12px;
}

.correct-word-highlight {
    color: #00f0ff;
    font-size: 1.35rem;
    font-family: var(--font-en);
    text-shadow: 0 0 10px #00f0ff;
    margin: 0 6px;
}

.coaching-listen-btn {
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid #00f0ff;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.9rem;
    margin-right: 6px;
}

.coaching-continue-btn {
    background: linear-gradient(135deg, #e62429, #0066cc);
    border: 1.5px solid #ffd60a;
    color: #ffffff;
    padding: 8px 24px;
    border-radius: 25px;
    font-weight: 800;
    font-family: var(--font-ar);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 36, 41, 0.6);
    transition: transform 0.2s ease;
}

.coaching-continue-btn:hover {
    transform: scale(1.05);
}

/* =========================================================
   MECHANIC 1: Timing Blaster V2
========================================================= */
.timing-game-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
}

.timing-bar-v2 {
    position: relative;
    width: 100%;
    max-width: 660px;
    height: 85px;
    background: rgba(8, 12, 28, 0.95);
    border: 3px solid #00f0ff;
    border-radius: 22px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.timing-zone-v2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 2px dashed rgba(0, 240, 255, 0.4);
    background: rgba(0, 102, 204, 0.12);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.timing-zone-v2:last-child {
    border-right: none;
}

.timing-zone-v2:hover {
    background: rgba(0, 240, 255, 0.25);
}

.zone-badge {
    font-size: 0.8rem;
    color: #ffd60a;
    font-weight: 800;
    font-family: var(--font-ar);
    margin-bottom: 2px;
}

.zone-text {
    font-size: 1.45rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-en);
}

.timing-needle-v2 {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #ffd60a;
    box-shadow: 0 0 15px #ffd60a, 0 0 25px #e62429;
    z-index: 10;
    pointer-events: none;
    transform: translateX(-50%);
}

.needle-spider-head {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px #ffd60a);
}

.needle-laser-line {
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background: #ffd60a;
    box-shadow: 0 0 10px #ffd60a;
}

/* =========================================================
   MECHANIC 2: Striking Crosshair V2
========================================================= */
.striking-game-v2 {
    position: relative;
    width: 100%;
    max-width: 660px;
    margin: 1rem auto 0 auto;
}

.goals-row-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 2rem;
}

.strike-goal-v2 {
    background: rgba(13, 20, 44, 0.95);
    border: 2.5px solid #e62429;
    border-radius: 20px;
    padding: 1.2rem 0.8rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
    transition: all 0.25s ease;
}

.strike-goal-v2:hover {
    transform: translateY(-4px);
    border-color: #00f0ff;
    box-shadow: 0 12px 30px rgba(0, 240, 255, 0.5);
}

.goal-target-ring {
    font-size: 1.5rem;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 8px #e62429);
}

.goal-text {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-en);
}

.reticle-track {
    position: relative;
    width: 100%;
    height: 60px;
    margin-bottom: 10px;
}

.crosshair-v2 {
    position: absolute;
    top: 5px;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 10;
    filter: drop-shadow(0 0 16px #00f0ff);
    transition: left 0.04s linear;
}

/* =========================================================
   MECHANIC 3: Hovering Spider-Tracer Drones
========================================================= */
.bouncing-game-v2 {
    position: relative;
    width: 100%;
    max-width: 660px;
    height: 240px;
    margin: 1rem auto;
    background: radial-gradient(circle at center, rgba(0, 102, 204, 0.25) 0%, rgba(8, 12, 28, 0.8) 75%);
    border: 2px dashed rgba(0, 240, 255, 0.5);
    border-radius: 24px;
    overflow: hidden;
}

.radar-scanlines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0, 240, 255, 0.05) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    pointer-events: none;
}

.spider-tracer-drone {
    position: absolute;
    top: 30px;
    background: linear-gradient(135deg, rgba(16, 26, 56, 0.95), rgba(8, 12, 28, 0.98));
    border: 2.5px solid #00f0ff;
    border-radius: 50px;
    padding: 10px 22px;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.6);
    animation: droneHoverFloat 2.6s infinite alternate ease-in-out;
    transform: translateX(-50%);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.spider-tracer-drone:hover {
    transform: translateX(-50%) scale(1.12);
    border-color: #ffd60a;
    box-shadow: 0 0 30px rgba(255, 214, 10, 0.9);
}

.drone-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 10px #00f0ff);
}

.drone-text {
    font-size: 1.35rem;
    font-weight: 900;
    font-family: var(--font-en);
}

@keyframes droneHoverFloat {
    0% { top: 25px; transform: translateX(-50%) rotate(-3deg); }
    50% { top: 130px; transform: translateX(-50%) rotate(4deg); }
    100% { top: 45px; transform: translateX(-50%) rotate(-2deg); }
}

/* =========================================================
   MECHANIC 4: City Rush Obstacles
========================================================= */
.dodge-game-v2 {
    position: relative;
    width: 100%;
    max-width: 660px;
    margin: 1rem auto;
    padding: 1.6rem;
    background: rgba(8, 12, 26, 0.92);
    border: 2px solid rgba(0, 102, 204, 0.6);
    border-radius: 24px;
    overflow: hidden;
}

.city-skyline-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(rgba(0, 240, 255, 0.08) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(230, 36, 41, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    animation: roadScroll 4s linear infinite;
    pointer-events: none;
}

.enemies-row-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    position: relative;
    z-index: 2;
}

.city-obstacle-v2 {
    background: linear-gradient(135deg, rgba(16, 24, 52, 0.96), rgba(8, 12, 28, 0.99));
    border: 2.5px solid #00f0ff;
    border-radius: 22px;
    padding: 1.4rem 0.8rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 240, 255, 0.35);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.city-obstacle-v2:hover {
    transform: translateY(-6px) scale(1.06);
    border-color: #ffd60a;
    box-shadow: 0 12px 30px rgba(255, 214, 10, 0.7);
}

.obstacle-drone-avatar {
    font-size: 2.4rem;
    margin-bottom: 6px;
    filter: drop-shadow(0 0 10px #00f0ff);
}

.obstacle-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-en);
    margin-bottom: 4px;
}

.obstacle-web-target {
    font-size: 0.85rem;
    color: #ffd60a;
    font-weight: 800;
    font-family: var(--font-ar);
}

/* =========================================================
   MECHANIC 5: Stark Tech Vault Smash
========================================================= */
.smash-game-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    width: 100%;
    max-width: 660px;
    margin: 1rem auto;
}

.stark-vault-box {
    background: linear-gradient(135deg, rgba(18, 26, 56, 0.96), rgba(10, 14, 32, 0.99));
    border: 2.5px solid #e62429;
    border-radius: 22px;
    padding: 1.4rem 0.8rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.75);
    transition: transform 0.15s ease, border-color 0.2s ease;
    user-select: none;
}

.stark-vault-box:hover {
    border-color: #ffd60a;
    box-shadow: 0 0 25px rgba(255, 214, 10, 0.5);
    transform: scale(1.04);
}

.vault-armor-bar {
    display: flex;
    gap: 4px;
    height: 6px;
    margin-bottom: 10px;
}

.armor-segment {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.armor-segment.active {
    background: #00f0ff;
    box-shadow: 0 0 6px #00f0ff;
}

.vault-crate-icon {
    font-size: 2.8rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
    transition: transform 0.15s ease;
}

.vault-opt-label {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-en);
    margin: 6px 0;
}

.vault-status-hint {
    font-size: 0.8rem;
    color: #ffd60a;
    font-weight: 800;
    font-family: var(--font-ar);
}

.stark-vault-box.cracked-1 {
    border-color: #ffd60a;
    animation: smashWiggle 0.15s ease;
}

.stark-vault-box.cracked-2 {
    border-color: #00f0ff;
    box-shadow: 0 0 20px #00f0ff;
    animation: smashWiggle 0.2s ease;
}

@keyframes smashWiggle {
    0%, 100% { transform: rotate(0deg); }
    33% { transform: rotate(-6deg) scale(0.95); }
    66% { transform: rotate(6deg) scale(0.95); }
}

/* =========================================================
   MECHANIC 6: Spider-Sense Power Level Slider
========================================================= */
.slider-game-v2 {
    width: 100%;
    max-width: 660px;
    margin: 1rem auto;
    padding: 1.6rem;
    background: rgba(8, 12, 28, 0.92);
    border: 2px solid rgba(0, 102, 204, 0.6);
    border-radius: 24px;
}

.spider-sense-gauge-visual {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    background: radial-gradient(circle at center, #0c183a, #080c1c);
    border: 3px solid #00f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5), inset 0 0 15px rgba(0, 102, 204, 0.6);
}

.gauge-center-dial {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#gauge-readout-word {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffd60a;
    font-family: var(--font-en);
}

.gauge-spider-badge {
    font-size: 0.85rem;
    font-weight: 800;
    color: #00f0ff;
}

.slider-labels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 1.6rem;
}

.slider-val-box {
    background: rgba(13, 20, 44, 0.9);
    border: 2px solid rgba(0, 240, 255, 0.4);
    border-radius: 16px;
    padding: 12px 6px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.slider-val-box.active-slider-val {
    border-color: #ffd60a;
    background: rgba(255, 214, 10, 0.2);
    box-shadow: 0 0 20px rgba(255, 214, 10, 0.6);
    transform: scale(1.05);
}

.slider-box-badge {
    display: block;
    font-size: 0.8rem;
    color: #ffd60a;
    font-family: var(--font-ar);
    font-weight: 800;
    margin-bottom: 2px;
}

.slider-box-word {
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-en);
}

.engine-slider-v2 {
    width: 100%;
    height: 16px;
    border-radius: 10px;
    background: linear-gradient(90deg, #e62429, #ffd60a, #00f0ff);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.engine-slider-v2::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffd60a;
    border: 3px solid #e62429;
    box-shadow: 0 0 20px #ffd60a;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.engine-slider-v2::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* =========================================================
   MECHANIC 7: Stark Nano-Web Matrix (Drag & Drop + Tap)
========================================================= */
.drag-drop-game-v2 {
    width: 100%;
    max-width: 660px;
    margin: 1rem auto;
}

.capsules-inventory {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}

.nano-capsule-item {
    background: linear-gradient(135deg, #e62429 0%, #0066cc 100%);
    border: 2.5px solid #ffd60a;
    border-radius: 50px;
    padding: 10px 24px;
    color: #ffffff;
    cursor: grab;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6), 0 0 15px rgba(230, 36, 41, 0.4);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.nano-capsule-item:hover {
    transform: translateY(-3px) scale(1.06);
    border-color: #00f0ff;
    box-shadow: 0 12px 28px rgba(0, 240, 255, 0.6);
}

.nano-capsule-item:active {
    cursor: grabbing;
}

.capsule-text {
    font-size: 1.35rem;
    font-weight: 900;
    font-family: var(--font-en);
}

.capsule-hint {
    font-size: 0.75rem;
    color: #ffd60a;
    font-weight: 800;
    font-family: var(--font-ar);
}

.capsule-teleporting {
    animation: capsuleVanish 0.4s forwards;
}

@keyframes capsuleVanish {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3) rotate(15deg); filter: drop-shadow(0 0 20px #00f0ff); }
    100% { transform: scale(0); opacity: 0; }
}

.nano-portal-dropzone {
    border: 3px dashed #00f0ff;
    border-radius: 24px;
    padding: 2.4rem 1.5rem;
    background: rgba(0, 102, 204, 0.12);
    box-shadow: inset 0 0 30px rgba(0, 240, 255, 0.2);
    transition: all 0.3s ease;
}

.nano-portal-dropzone.drag-hover {
    background: rgba(0, 240, 255, 0.25);
    border-color: #ffd60a;
    transform: scale(1.02);
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.6);
}

.portal-core-ring {
    font-size: 3.2rem;
    margin-bottom: 8px;
    animation: portalSpin 6s linear infinite;
}

@keyframes portalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.portal-main-label {
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffd60a;
    font-family: var(--font-ar);
    margin-bottom: 4px;
}

.portal-sub-label {
    font-size: 1rem;
    color: #bde0fe;
    font-family: var(--font-ar);
    font-weight: 700;
}

/* =========================================================
   HERO RESULTS / VICTORY / DEFEAT SCREENS
========================================================= */
.hero-result-screen {
    padding: 2.8rem 2rem;
}

.result-badge-icon {
    font-size: 4rem;
    margin-bottom: 12px;
}

.victory-trophy {
    animation: trophyFloat 2s infinite alternate ease-in-out;
    filter: drop-shadow(0 0 25px #ffd60a);
}

@keyframes trophyFloat {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-10px) scale(1.08); }
}

.hero-stars-row {
    font-size: 2.4rem;
    letter-spacing: 8px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 15px #ffd60a);
    animation: starPulse 1.2s infinite alternate;
}

@keyframes starPulse {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
}

.result-title {
    font-size: 2.1rem;
    font-weight: 900;
    font-family: var(--font-ar);
    margin-bottom: 8px;
}

.victory-title {
    color: #ffd60a;
    text-shadow: 0 0 25px rgba(255, 214, 10, 0.9);
}

.defeat-title {
    color: #e62429;
    text-shadow: 0 0 25px rgba(230, 36, 41, 0.8);
}

.hero-rank-tag {
    display: inline-block;
    background: linear-gradient(135deg, #e62429, #0066cc);
    color: #ffffff;
    border: 2px solid #ffd60a;
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 900;
    font-size: 1.15rem;
    font-family: var(--font-ar);
    box-shadow: 0 0 18px rgba(255, 214, 10, 0.5);
    margin-bottom: 14px;
}

.result-msg {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    max-width: 580px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
    font-family: var(--font-ar);
}

.result-stats-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 2.4rem;
    flex-wrap: wrap;
}

.result-stat-box {
    background: rgba(8, 12, 28, 0.9);
    border: 2px solid #00f0ff;
    border-radius: 18px;
    padding: 12px 24px;
    min-width: 120px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffd60a;
    font-family: var(--font-en);
}

.stat-lbl {
    font-size: 0.85rem;
    color: #bde0fe;
    font-weight: 800;
    font-family: var(--font-ar);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-action-btn {
    padding: 12px 26px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 900;
    font-family: var(--font-ar);
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.primary-hero-btn {
    background: linear-gradient(135deg, #e62429, #0066cc);
    color: #ffffff;
    border: 2px solid #ffd60a;
    box-shadow: 0 8px 25px rgba(230, 36, 41, 0.6);
}

.primary-hero-btn:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: #00f0ff;
    box-shadow: 0 12px 30px rgba(0, 240, 255, 0.7);
}

.secondary-hero-btn {
    background: rgba(0, 102, 204, 0.25);
    color: #ffffff;
    border: 2px solid #00f0ff;
}

.secondary-hero-btn:hover {
    background: #0066cc;
    transform: translateY(-3px);
}

.tertiary-hero-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.tertiary-hero-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Flash Animations */
.correct-flash {
    animation: spideyCorrectFlash 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes spideyCorrectFlash {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); background: #00f0ff !important; border-color: #ffffff !important; box-shadow: 0 0 35px #00f0ff, 0 0 50px #ffd60a !important; color: #080a14 !important; }
    100% { transform: scale(1); }
}

.wrong-shake {
    animation: spideyWrongShake 0.6s ease-in-out !important;
}

@keyframes spideyWrongShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-12px); border-color: #e62429 !important; box-shadow: 0 0 25px #e62429 !important; }
    40%, 80% { transform: translateX(12px); }
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .fairy-header {
        flex-direction: column;
        padding: 1rem;
        gap: 12px;
    }
    .fairy-header.lesson-header-mode {
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 0.4rem 1rem !important;
        gap: 8px !important;
    }
    .fairy-header-center {
        order: -1;
    }
    .main-title {
        font-size: 1.8rem;
    }
    .book-selection-cards {
        grid-template-columns: 1fr;
    }
    .book-card {
        flex-direction: column;
        text-align: center;
        padding: 1.8rem 1.2rem;
    }
    .book-card-info {
        align-items: center;
    }
    .book-badge-pill, .book-card-action-btn {
        align-self: center;
    }
    .lesson-car-btn {
        flex-direction: column;
        text-align: center;
    }
    .lesson-info {
        align-items: center;
    }
    .lesson-cta-pill {
        align-self: center;
    }
    #translator-chat-window {
        width: 300px;
        left: -10px;
    }
}

/* ==========================================================================
   SUPERHERO INTERACTIVE LESSON FEATURES (THE 4 UNIQUE EXPERIENCES)
   ========================================================================== */

/* Outer Feature Container */
.lesson-featured-interactive-section {
    margin-top: 3.5rem;
    margin-bottom: 2.5rem;
}

.spidey-interactive-box {
    background: linear-gradient(145deg, rgba(8, 14, 34, 0.95), rgba(16, 24, 52, 0.95));
    border: 2.5px solid var(--accent);
    border-radius: 24px;
    padding: 2rem 1.8rem;
    box-shadow: 0 0 35px rgba(255, 214, 10, 0.25), inset 0 0 25px rgba(0, 240, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.spidey-interactive-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230, 36, 41, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.interactive-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.interactive-box-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 214, 10, 0.5);
    margin: 0;
}

.interactive-hero-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #ffd60a;
    box-shadow: 0 0 12px rgba(230, 36, 41, 0.4);
}

/* -------------------------------------------------------------
   FEATURE 1: 3D SPIDER FLIP CARDS
   ------------------------------------------------------------- */
.flip-cards-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.flip-cards-deck {
    width: 100%;
    max-width: 440px;
    height: 290px;
    perspective: 1200px;
}

.flip-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.flip-card.is-flipped {
    transform: rotateY(180deg);
}

.flip-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 1.8rem;
    box-sizing: border-box;
}

.flip-card-front {
    background: linear-gradient(135deg, rgba(13, 20, 48, 0.98), rgba(20, 32, 70, 0.98));
    border: 2.5px solid #00f0ff;
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.35);
}

.flip-card-back {
    background: linear-gradient(135deg, rgba(30, 10, 20, 0.98), rgba(60, 15, 30, 0.98));
    border: 2.5px solid #ffd60a;
    box-shadow: 0 10px 30px rgba(255, 214, 10, 0.4);
    transform: rotateY(180deg);
}

.flip-card-badge {
    background: rgba(0, 240, 255, 0.15);
    color: #00f0ff;
    border: 1px solid #00f0ff;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.flip-card-back .flip-card-badge {
    background: rgba(255, 214, 10, 0.15);
    color: #ffd60a;
    border-color: #ffd60a;
}

.flip-card-word-en {
    font-size: 2.6rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 18px rgba(0, 240, 255, 0.8);
    font-family: var(--font-en);
    margin: 10px 0;
    text-align: center;
}

.flip-card-word-ar {
    font-size: 2.3rem;
    font-weight: 900;
    color: #ffd60a;
    text-shadow: 0 0 15px rgba(255, 214, 10, 0.8);
    font-family: var(--font-ar);
    margin: 10px 0;
    text-align: center;
}

.flip-card-audio-row {
    display: flex;
    gap: 12px;
}

.flip-audio-btn {
    background: linear-gradient(135deg, #0066cc, #00b0ff);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 176, 255, 0.35);
    transition: all 0.2s ease;
}

.flip-audio-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 176, 255, 0.6);
}

.flip-audio-slow {
    background: linear-gradient(135deg, #7b2cbf, #9d4edd);
    box-shadow: 0 4px 12px rgba(157, 78, 221, 0.35);
}

.flip-hint-pill {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 6px;
}

.flip-nav-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.flip-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    padding: 10px 22px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: bold;
    font-family: var(--font-ar);
    transition: all 0.2s ease;
}

.flip-nav-btn:hover {
    background: var(--primary);
    border-color: #ffd60a;
    transform: scale(1.05);
}

.flip-mastered-btn {
    background: linear-gradient(135deg, #ffd60a, #ff9100);
    color: #080c1c;
    border: none;
    padding: 8px 18px;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
    font-family: var(--font-ar);
    transition: all 0.2s ease;
}

.flip-mastered-btn.mastered {
    background: #00e676;
    color: #000000;
}

/* -------------------------------------------------------------
   FEATURE 2: INTERACTIVE ROLE-PLAY MODE
   ------------------------------------------------------------- */
.roleplay-stage {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.roleplay-dialogue-card {
    background: rgba(8, 12, 28, 0.85);
    border: 2px solid rgba(0, 240, 255, 0.4);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.roleplay-bubble-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.roleplay-bubble-row.hero-row {
    flex-direction: row-reverse;
}

.roleplay-avatar-wrap {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    position: relative;
}

.roleplay-speech-bubble {
    background: rgba(20, 30, 60, 0.9);
    border: 2px solid #00f0ff;
    border-radius: 18px;
    border-top-left-radius: 4px;
    padding: 14px 18px;
    max-width: 80%;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    position: relative;
}

.hero-row .roleplay-speech-bubble {
    background: rgba(50, 15, 25, 0.9);
    border-color: #ffd60a;
    border-top-left-radius: 18px;
    border-top-right-radius: 4px;
    text-align: right;
}

.roleplay-speaker-tag {
    font-size: 0.85rem;
    font-weight: 800;
    color: #00f0ff;
    margin-bottom: 6px;
}

.hero-row .roleplay-speaker-tag {
    color: #ffd60a;
}

.roleplay-text-en {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-en);
    margin-bottom: 4px;
    cursor: pointer;
}

.roleplay-text-ar {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-ar);
}

.roleplay-options-shelf {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(13, 20, 44, 0.9);
    padding: 16px;
    border-radius: 18px;
    border: 2px dashed #ffd60a;
}

.roleplay-shelf-title {
    color: #ffd60a;
    font-weight: 900;
    font-size: 1.1rem;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.roleplay-choice-btn {
    background: linear-gradient(135deg, rgba(230, 36, 41, 0.25), rgba(0, 102, 204, 0.25));
    border: 2px solid #00f0ff;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 14px;
    font-family: var(--font-en);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.roleplay-choice-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: #ffd60a;
    transform: translateX(-4px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
}

/* -------------------------------------------------------------
   FEATURE 3: WEB SENTENCE BUILDER
   ------------------------------------------------------------- */
.sentence-builder-stage {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.sentence-target-card {
    text-align: center;
    background: rgba(8, 14, 32, 0.9);
    border: 2px solid #00f0ff;
    border-radius: 18px;
    padding: 1.2rem;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.sentence-target-ar {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffd60a;
    text-shadow: 0 0 10px rgba(255, 214, 10, 0.6);
}

.sentence-assembly-line {
    min-height: 85px;
    background: rgba(5, 8, 20, 0.95);
    border: 2.5px solid #e62429;
    border-radius: 20px;
    padding: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: inset 0 0 20px rgba(230, 36, 41, 0.3);
    position: relative;
}

.sentence-assembly-line::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 2px;
    background: repeating-linear-gradient(90deg, #00f0ff 0, #00f0ff 10px, transparent 10px, transparent 20px);
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

.web-scrambled-shelf {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    background: rgba(13, 20, 44, 0.7);
    border-radius: 18px;
}

.web-word-node {
    background: linear-gradient(135deg, rgba(13, 22, 50, 0.95), rgba(22, 35, 75, 0.95));
    color: #ffffff;
    border: 2px solid #00f0ff;
    padding: 10px 20px;
    border-radius: 16px;
    font-family: var(--font-en);
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.25);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.web-word-node:hover {
    transform: translateY(-4px) scale(1.06);
    border-color: #ffd60a;
    box-shadow: 0 8px 25px rgba(255, 214, 10, 0.5);
}

.web-word-node.in-assembly {
    background: linear-gradient(135deg, #e62429, #0066cc);
    border-color: #ffd60a;
    box-shadow: 0 0 20px rgba(255, 214, 10, 0.6);
}

.pulse-next-btn {
    animation: spideyNextPulse 1.1s infinite alternate !important;
}

@keyframes spideyNextPulse {
    0% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 214, 10, 0.4); }
    100% { transform: scale(1.08); box-shadow: 0 0 25px rgba(230, 36, 41, 0.9), 0 0 16px rgba(255, 214, 10, 0.9); }
}

.builder-solve-btn:hover {
    background: linear-gradient(135deg, #00b4d8, #005f73) !important;
    border-color: #ffd60a !important;
    transform: scale(1.05);
}

.builder-next-btn:hover {
    background: linear-gradient(135deg, #ff2a30, #c4151b) !important;
    border-color: #00f0ff !important;
    transform: scale(1.05);
}

/* -------------------------------------------------------------
   FEATURE 4: SPIDER-SENSE SPEED RADAR
   ------------------------------------------------------------- */
.radar-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.radar-top-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 480px;
    align-items: center;
}

.radar-timer-pill {
    background: rgba(230, 36, 41, 0.2);
    border: 2px solid #e62429;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 16px;
    font-weight: 900;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(230, 36, 41, 0.4);
}

.radar-screen-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, rgba(8, 14, 32, 0.95) 70%);
    border: 3.5px solid #00f0ff;
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.4), inset 0 0 35px rgba(0, 240, 255, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-concentric-1 {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    border: 1px dashed rgba(0, 240, 255, 0.4);
}

.radar-concentric-2 {
    position: absolute;
    width: 40%;
    height: 40%;
    border-radius: 50%;
    border: 1px solid rgba(0, 240, 255, 0.5);
}

.radar-crosshair-x {
    position: absolute;
    width: 100%;
    height: 1px;
    background: rgba(0, 240, 255, 0.35);
}

.radar-crosshair-y {
    position: absolute;
    height: 100%;
    width: 1px;
    background: rgba(0, 240, 255, 0.35);
}

.radar-sweep-beam {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    background: conic-gradient(from 0deg at 0% 0%, rgba(0, 240, 255, 0.6) 0deg, transparent 60deg);
    transform-origin: 0 0;
    animation: radarSpin 2.5s linear infinite;
    pointer-events: none;
}

@keyframes radarSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radar-center-hub {
    position: relative;
    z-index: 2;
    text-align: center;
}

.radar-word-en {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 15px #00f0ff;
    font-family: var(--font-en);
}

.radar-targets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 460px;
}

.radar-target-btn {
    background: linear-gradient(135deg, rgba(13, 20, 44, 0.95), rgba(20, 30, 60, 0.95));
    border: 2px solid #ffd60a;
    color: #ffffff;
    padding: 14px 16px;
    border-radius: 16px;
    font-family: var(--font-ar);
    font-weight: 900;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 214, 10, 0.25);
    transition: all 0.25s ease;
    text-align: center;
}

.radar-target-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #e62429, #0066cc);
    box-shadow: 0 6px 20px rgba(230, 36, 41, 0.5);
}

/* Footer & Butterfly Electronic Copyright Link */
.spidey-footer {
    text-align: center;
    padding: 1.8rem 1rem;
    margin-top: 3rem;
    border-top: 2px solid var(--primary);
    background: rgba(8, 12, 26, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 -5px 25px rgba(230, 36, 41, 0.35);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.footer-platform-title {
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-ar);
}

.butterfly-copyright-link {
    color: #ffd60a;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 800;
    font-family: var(--font-ar);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    border-radius: 50px;
    background: rgba(255, 214, 10, 0.08);
    border: 1.5px solid rgba(255, 214, 10, 0.35);
    box-shadow: 0 0 15px rgba(255, 214, 10, 0.15);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 0 0 10px rgba(255, 214, 10, 0.4);
    cursor: pointer;
}

.butterfly-copyright-link:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(230, 36, 41, 0.85), rgba(0, 102, 204, 0.85));
    border-color: #ffd60a;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 6px 25px rgba(255, 214, 10, 0.45), 0 0 20px rgba(0, 240, 255, 0.4);
    text-shadow: 0 0 12px #ffffff;
}