@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=Cinzel:wght@700;900&display=swap');

:root {
    /* =========================================================
       SPIDER-MAN SUPERHERO - DESIGN SYSTEM & COLOR TOKENS 🕷️🕸️⚡
    ========================================================= */
    --spidey-red: #e60026;            /* Iconic Spider Crimson */
    --spidey-red-glow: #ff2a4b;       /* Web Flare Crimson */
    --spidey-red-dark: #8b0014;       /* Deep Suit Shadow Red */
    --spidey-blue: #0066ff;           /* Cyber Cobalt Spider Blue */
    --spidey-blue-glow: #3385ff;      /* Electric Web Blue */
    --spidey-blue-dark: #002673;      /* Deep Midnight Blue */
    --spidey-cyan: #00d2ff;           /* Spider-Sense & Tech Neon Cyan */
    --spidey-gold: #ffd700;           /* Iron Spider Gold Accent */
    --spidey-gold-glow: #ffea79;      /* Golden Spark */
    --spidey-dark: #060913;           /* NYC Night Skyline Stealth Black */
    --spidey-dark-card: #0c1324;      /* High-tech Suit Armor */
    --white: #ffffff;
    
    /* Functional Theme Mapping */
    --primary: var(--spidey-red);
    --primary-dark: var(--spidey-red-dark);
    --primary-light: var(--spidey-red-glow);
    --secondary: var(--spidey-blue);
    --secondary-dark: var(--spidey-blue-dark);
    --accent: var(--spidey-cyan);
    --accent-glow: var(--spidey-gold);
    --accent-cyan: var(--spidey-cyan);
    --dark: var(--spidey-dark);
    
    --card-bg: linear-gradient(135deg, rgba(14, 22, 42, 0.95) 0%, rgba(8, 12, 24, 0.98) 100%);
    --card-border: rgba(230, 0, 38, 0.6);
    --card-border-hover: var(--spidey-cyan);
    
    --text-main: #ffffff;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --success: var(--spidey-cyan);
    --warning: var(--spidey-gold);

    --spidey-glow: 0 0 25px rgba(230, 0, 38, 0.85), 0 0 50px rgba(0, 102, 255, 0.5);
    --web-glow: 0 0 25px rgba(0, 210, 255, 0.9), 0 0 45px rgba(0, 102, 255, 0.6);
    --gold-glow: 0 0 25px rgba(255, 215, 0, 0.85), 0 0 40px rgba(230, 0, 38, 0.5);
    --shadow: 0 15px 40px rgba(0, 0, 0, 0.85);
    --shadow-hover: 0 22px 60px rgba(230, 0, 38, 0.7);
    --radius: 28px;

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   SPIDER-MAN - DYNAMIC NYC SKYLINE & WEB-SUIT BACKGROUND 🕷️🕸️
========================================================= */
body {
    font-family: var(--font-ar);
    background-color: var(--spidey-dark);
    color: var(--text-main);
    line-height: 1.6;
    background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(230, 0, 38, 0.35) 0%, transparent 60%),
        radial-gradient(circle at 10% 40%, rgba(0, 102, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 90% 60%, rgba(0, 210, 255, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 50% 100%, rgba(255, 215, 0, 0.18) 0%, transparent 55%),
        /* Spider Web Hex Pattern */
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0 L60 15 L60 45 L30 60 L0 45 L0 15 Z' fill='none' stroke='%23e60026' stroke-opacity='0.08' stroke-width='1'/%3E%3Cpath d='M30 10 L50 20 L50 40 L30 50 L10 40 L10 20 Z' fill='none' stroke='%230066ff' stroke-opacity='0.06' stroke-width='1'/%3E%3Cline x1='30' y1='0' x2='30' y2='60' stroke='%23ffffff' stroke-opacity='0.04'/%3E%3Cline x1='0' y1='15' x2='60' y2='45' stroke='%23ffffff' stroke-opacity='0.04'/%3E%3Cline x1='0' y1='45' x2='60' y2='15' stroke='%23ffffff' stroke-opacity='0.04'/%3E%3Ccircle cx='30' cy='30' r='2' fill='%2300d2ff' fill-opacity='0.25'/%3E%3C/svg%3E");
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 60px 60px;
    background-attachment: fixed;
    animation: spideyAtmosphere 10s ease-in-out infinite alternate;
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
    display: flex;
    flex-direction: column;
}

@keyframes spideyAtmosphere {
    0% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(8deg) brightness(1.06); }
    100% { filter: hue-rotate(-8deg) brightness(1); }
}

/* =========================================================
   Corner Spider Web Accents 🕸️
========================================================= */
.web-corner {
    position: fixed;
    width: 140px;
    height: 140px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.85;
    animation: webCornerBreathe 4s ease-in-out infinite alternate;
}

.web-top-left {
    top: 0;
    left: 0;
}

.web-top-right {
    top: 0;
    right: 0;
}

@keyframes webCornerBreathe {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 12px rgba(230,0,38,0.7)); }
}

/* =========================================================
   Stark-Tech Spider-Suit HUD Telemetry Bar 🕷️⚡
========================================================= */
.spidey-hud-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, rgba(8, 14, 28, 0.94), rgba(18, 28, 54, 0.92));
    border: 1.5px solid rgba(0, 210, 255, 0.5);
    border-radius: 40px;
    padding: 8px 26px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 210, 255, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

.spidey-hud-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.2), transparent);
    animation: hudScanLine 4s infinite linear;
    pointer-events: none;
}

@keyframes hudScanLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(0.68rem, 1.8vw, 0.82rem);
    font-weight: 800;
    color: #ffffff;
    font-family: 'Orbitron', 'Alexandria', sans-serif;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.hud-status {
    color: #00d2ff;
}

.hud-pulse-dot {
    width: 9px;
    height: 9px;
    background: #00d2ff;
    border-radius: 50%;
    box-shadow: 0 0 10px #00d2ff, 0 0 20px #00d2ff;
    animation: hudPulse 1.2s infinite alternate;
}

@keyframes hudPulse {
    0% { opacity: 0.4; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.3); }
}

.hud-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

.hud-telemetry {
    color: #ffd700;
}

.hud-identity {
    color: #ffffff;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(230, 0, 38, 0.8);
}

/* =========================================================
   SPIDER-MAN HERO HEADER / NAVBAR 🕷️🕸️
========================================================= */
.fairy-header {
    background: linear-gradient(135deg, rgba(14, 22, 42, 0.96) 0%, rgba(7, 10, 20, 0.98) 100%);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85), 0 0 35px rgba(230, 0, 38, 0.45);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 2.5px solid var(--spidey-red);
    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%;
}

/* 1. Student Profile */
.user-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.user-profile-header:hover {
    transform: translateY(-2px);
}

.user-avatar-glow {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--spidey-red) 0%, var(--spidey-blue-dark) 100%);
    border: 2.5px solid var(--spidey-cyan);
    box-shadow: 0 0 22px rgba(230, 0, 38, 0.9), 0 0 32px rgba(0, 102, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-avatar-glow:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px var(--spidey-red-glow), 0 0 45px var(--spidey-cyan);
}

.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: linear-gradient(135deg, var(--spidey-red), var(--spidey-blue));
    border: 1.5px solid var(--spidey-gold);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    animation: spiderBadgePulse 2.5s infinite ease-in-out;
}

@keyframes spiderBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); box-shadow: 0 0 12px var(--spidey-cyan); }
}

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

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

.student-grade-pill {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--spidey-cyan);
    background: rgba(230, 0, 38, 0.25);
    border: 1px solid rgba(0, 210, 255, 0.6);
    border-radius: 20px;
    padding: 2px 10px;
    margin-top: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

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

.magical-title {
    font-size: clamp(1.25rem, 2.2vw, 1.85rem);
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #ff6b81 30%, #00d2ff 70%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(230, 0, 38, 0.6);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.magical-subtitle {
    font-size: 0.85rem;
    color: #f1f5f9;
    margin: 3px 0 0 0;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.7);
}

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

.btn-play-fairies {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: linear-gradient(135deg, var(--spidey-red) 0%, var(--spidey-blue) 60%, var(--spidey-cyan) 100%);
    color: #FFFFFF !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-weight: 900;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(230, 0, 38, 0.75), 0 0 16px rgba(0, 102, 255, 0.6);
    border: 2px solid var(--spidey-gold);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-play-fairies:hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 30px rgba(230, 0, 38, 1), 0 0 28px rgba(0, 210, 255, 0.9);
    background: linear-gradient(135deg, var(--spidey-cyan) 0%, var(--spidey-blue) 50%, var(--spidey-red) 100%);
}

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

@keyframes spideyIconSwing {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-15deg) scale(1.15); }
    75% { transform: rotate(15deg) scale(1.15); }
}

.fairy-sparkle-star {
    font-size: 0.85rem;
    animation: spideyStarPulse 1.5s infinite alternate;
}

@keyframes spideyStarPulse {
    0% { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 8px var(--spidey-gold)); }
}

/* =========================================================
   SPIDER-MAN HUD BAR 🕷️⚡
========================================================= */
.fairy-hud-bar {
    width: 95%;
    max-width: 1100px;
    margin: 14px auto 0 auto;
    background: linear-gradient(135deg, rgba(16, 26, 50, 0.94), rgba(8, 12, 24, 0.98));
    border: 2px solid rgba(230, 0, 38, 0.7);
    border-radius: 20px;
    padding: 8px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 30px rgba(230, 0, 38, 0.45), inset 0 0 20px rgba(0, 102, 255, 0.25);
    backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}

.fairy-hud-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 210, 255, 0.25) 50%, transparent 100%);
    animation: spideyLaserScan 3s infinite linear;
    pointer-events: none;
}

@keyframes spideyLaserScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.fairy-readout {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-digital);
    color: var(--spidey-cyan);
    font-size: 0.95rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.85);
}

.fairy-power-badge {
    background: rgba(230, 0, 38, 0.35);
    border: 1.5px solid var(--spidey-cyan);
    padding: 4px 16px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 1px;
    font-family: var(--font-digital);
    animation: spideyPowerPulse 1.8s infinite ease-in-out alternate;
}

@keyframes spideyPowerPulse {
    0% { text-shadow: 0 0 6px var(--spidey-cyan); border-color: var(--spidey-cyan); }
    100% { text-shadow: 0 0 20px var(--spidey-red-glow), 0 0 35px var(--spidey-cyan); border-color: var(--spidey-red); color: #ffffff; }
}

/* =========================================================
   Main Portal Wrapper & Glass Card 🕷️
========================================================= */
.main-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    padding: 30px 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.section-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.glass-card {
    background: linear-gradient(145deg, rgba(10, 16, 32, 0.96) 0%, rgba(6, 9, 20, 0.98) 100%);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 2px solid rgba(230, 0, 38, 0.7);
    border-radius: 28px;
    padding: 42px 32px;
    width: 100%;
    max-width: 540px;
    position: relative;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 
                0 0 50px rgba(230, 0, 38, 0.4), 
                inset 0 0 35px rgba(0, 102, 255, 0.18);
    overflow: hidden;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spidey-tech-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(230, 0, 38, 0.18) 0%, transparent 60%),
        radial-gradient(circle at 50% 100%, rgba(0, 102, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.card-tech-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 210, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 210, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(230, 0, 38, 0.25) 0%, rgba(0, 102, 255, 0.2) 35%, transparent 65%);
    pointer-events: none;
    animation: spideyRadarRotate 12s infinite linear;
}

@keyframes spideyRadarRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================================
   Tech Corner Chips
========================================================= */
.tech-chip {
    position: absolute;
    top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 12px;
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 1px;
    background: rgba(8, 14, 28, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2;
}

.chip-left {
    left: 20px;
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.6);
}

.chip-right {
    right: 20px;
    color: #00d2ff;
    border: 1px solid rgba(0, 210, 255, 0.6);
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffd700;
    box-shadow: 0 0 8px #ffd700;
}

.chip-blue {
    background: #00d2ff;
    box-shadow: 0 0 8px #00d2ff;
}

/* =========================================================
   Spider-Man Nano-Tech Avatar Emblem 🕷️
========================================================= */
.spider-avatar-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 15px auto 20px;
}

.spider-avatar-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--spidey-red) 0%, #002673 80%, #00d2ff 100%);
    border: 3.5px solid var(--spidey-cyan);
    box-shadow: 0 0 35px rgba(230, 0, 38, 0.9), 0 0 45px rgba(0, 102, 255, 0.75);
    padding: 4px;
    animation: spideyHeroFloat 3.5s ease-in-out infinite alternate;
}

@keyframes spideyHeroFloat {
    0% { transform: translateY(0); box-shadow: 0 0 25px rgba(230, 0, 38, 0.9), 0 0 40px rgba(0, 102, 255, 0.7); }
    100% { transform: translateY(-8px); box-shadow: 0 0 45px rgba(0, 210, 255, 1), 0 0 60px rgba(230, 0, 38, 1); }
}

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

.spider-radar-ring {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1.5px dashed rgba(0, 210, 255, 0.6);
    pointer-events: none;
    animation: radarRingRotate 15s linear infinite;
}

@keyframes radarRingRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spider-insignia-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #e60026, #8b0014);
    border: 2px solid #ffd700;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(230, 0, 38, 0.95), 0 0 15px rgba(255, 215, 0, 0.7);
    font-size: 1.2rem;
    z-index: 3;
}

/* Spider-Man Eyes / Lenses Beside Avatar */
.spider-lens-left, .spider-lens-right {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 38px;
    background: linear-gradient(135deg, #ffffff, #c7ecff);
    border: 2px solid #060913;
    border-radius: 50% 0 50% 0;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.9);
    pointer-events: none;
}

.spider-lens-left {
    left: -16px;
    transform: translateY(-50%) rotate(25deg);
}

.spider-lens-right {
    right: -16px;
    transform: translateY(-50%) rotate(-25deg) scaleX(-1);
}

/* =========================================================
   Typography & Hero Badges
========================================================= */
.spidey-main-title {
    font-size: 2.35rem;
    font-weight: 900;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #ff4d6d 35%, #00d2ff 75%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(230, 0, 38, 0.85);
    letter-spacing: 0.5px;
}

.tagline {
    color: var(--spidey-cyan);
    font-size: 1.05rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(0, 210, 255, 0.75);
    letter-spacing: 0.5px;
}

.hero-badges-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: -8px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.nano-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 0.82rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.badge-red {
    background: rgba(230, 0, 38, 0.25);
    border: 1px solid #e60026;
    color: #ff6b81;
}

.badge-blue {
    background: rgba(0, 102, 255, 0.25);
    border: 1px solid #0066ff;
    color: #00d2ff;
}

.badge-gold {
    background: rgba(255, 215, 0, 0.25);
    border: 1px solid #ffd700;
    color: #ffd700;
}

.instruction {
    font-size: 1.05rem;
    color: #ffffff;
    background: rgba(14, 22, 44, 0.85);
    border: 1.5px solid rgba(230, 0, 38, 0.65);
    border-radius: 20px;
    padding: 14px 20px;
    margin-bottom: 25px;
    line-height: 1.7;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 210, 255, 0.15);
}

/* =========================================================
   Form, Code Input & Action Button 🕷️
========================================================= */
.premium-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.field-container {
    position: relative;
    width: 100%;
}

.field-container label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--spidey-cyan);
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.7);
    padding-right: 5px;
}

.input-web-wrapper {
    position: relative;
    width: 100%;
}

.input-web-wrapper input {
    width: 100%;
    background: rgba(8, 14, 28, 0.95);
    border: 2px solid rgba(230, 0, 38, 0.7);
    border-radius: 22px;
    padding: 16px 50px 16px 20px;
    color: #ffffff;
    font-size: 26px;
    text-align: center;
    letter-spacing: 10px;
    font-weight: 900;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.85);
}

.input-web-wrapper input:focus {
    outline: none;
    border-color: var(--spidey-cyan);
    background: rgba(14, 24, 48, 0.98);
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.9), inset 0 0 15px rgba(230, 0, 38, 0.4);
    transform: scale(1.02);
}

.input-web-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 6px;
}

.input-spider-badge {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    pointer-events: none;
    opacity: 0.8;
}

.spidey-action-btn {
    background: linear-gradient(135deg, #e60026 0%, #8b0014 45%, #0066ff 85%, #00d2ff 100%);
    color: #ffffff !important;
    border: 2px solid #ffd700;
    padding: 16px 26px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 30px rgba(230, 0, 38, 0.8), 0 0 25px rgba(0, 102, 255, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    width: 100%;
}

.spidey-action-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 40px rgba(230, 0, 38, 1), 0 0 40px rgba(0, 210, 255, 1);
    border-color: #00d2ff;
}

.btn-spider-icon {
    font-size: 1.4rem;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transition: 0.5s;
}

.spidey-action-btn:hover .btn-shine {
    left: 100%;
}

.spidey-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--spidey-cyan);
    font-weight: 800;
    padding: 16px;
    font-size: 1.05rem;
    text-shadow: 0 0 14px rgba(0, 210, 255, 0.95);
}

.loading-spider-spinner {
    font-size: 2.2rem;
    animation: spiderSpin 1.5s linear infinite;
}

@keyframes spiderSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* =========================================================
   Spider-Man Subject Mission Cards 🕸️🚀
========================================================= */
.spidey-missions-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.missions-header-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    color: #ffd700;
    font-weight: 900;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
}

.missions-radar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffd700;
    box-shadow: 0 0 10px #ffd700;
    animation: hudPulse 1s infinite alternate;
}

.spidey-mission-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 22px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
}

.mission-arabic {
    background: linear-gradient(135deg, rgba(230, 0, 38, 0.9) 0%, rgba(139, 0, 20, 0.92) 50%, rgba(0, 102, 255, 0.9) 100%);
    box-shadow: 0 8px 30px rgba(230, 0, 38, 0.55);
    border-color: rgba(230, 0, 38, 0.7);
}

.mission-math {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.9) 0%, rgba(0, 38, 115, 0.92) 50%, rgba(0, 210, 255, 0.9) 100%);
    box-shadow: 0 8px 30px rgba(0, 102, 255, 0.55);
    border-color: rgba(0, 102, 255, 0.7);
}

.mission-english {
    background: linear-gradient(135deg, rgba(230, 0, 38, 0.88) 0%, rgba(18, 28, 54, 0.92) 50%, rgba(0, 210, 255, 0.88) 100%);
    box-shadow: 0 8px 30px rgba(0, 210, 255, 0.45);
    border-color: rgba(0, 210, 255, 0.7);
}

.mission-games {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.88) 0%, rgba(230, 0, 38, 0.92) 55%, rgba(0, 102, 255, 0.88) 100%);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.55);
    border-color: rgba(255, 215, 0, 0.7);
}

.spidey-mission-card:hover {
    transform: translateY(-4px) scale(1.02);
    filter: brightness(1.1);
}

.mission-artwork {
    position: relative;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
}

.mission-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

.mission-num {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #080c18;
    color: #ffd700;
    border: 1px solid #ffd700;
    font-size: 0.65rem;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    padding: 1px 5px;
    border-radius: 8px;
}

.mission-details {
    flex: 1;
    text-align: right;
    padding: 0 14px;
}

.mission-sub {
    font-size: 0.72rem;
    color: #ffd700;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
}

.mission-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.mission-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 3px;
    font-weight: 600;
}

.mission-launch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(8, 14, 28, 0.85);
    border: 1.5px solid #ffd700;
    color: #ffd700;
    padding: 7px 16px;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 900;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.spidey-mission-card:hover .mission-launch {
    background: #ffd700;
    color: #080c18;
    box-shadow: 0 0 25px #ffd700;
}

.card-web-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.6s;
    pointer-events: none;
}

.spidey-mission-card:hover .card-web-glow {
    left: 100%;
}

/* =========================================================
   Post-Login Subjects Cards Grid 🕷️🕸️
========================================================= */
.fairy-subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    width: 100%;
    margin-top: 15px;
}

.fairy-subject-card {
    background: linear-gradient(135deg, rgba(16, 26, 52, 0.94) 0%, rgba(8, 12, 24, 0.98) 100%);
    border: 2.5px solid rgba(230, 0, 38, 0.6);
    border-radius: 26px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 25px rgba(230, 0, 38, 0.4);
    backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.fairy-subject-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--spidey-cyan);
    box-shadow: 0 16px 45px rgba(230, 0, 38, 0.85), 0 0 40px rgba(0, 210, 255, 0.85);
    background: linear-gradient(135deg, rgba(24, 40, 78, 0.98) 0%, rgba(10, 16, 34, 1) 100%);
}

.subject-icon-box {
    width: 78px;
    height: 78px;
    border-radius: 22px;
    background: radial-gradient(circle, var(--spidey-red) 0%, var(--spidey-blue-dark) 100%);
    border: 2px solid var(--spidey-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.3rem;
    margin-bottom: 14px;
    box-shadow: 0 0 25px rgba(230, 0, 38, 0.85);
    transition: transform 0.3s ease;
}

.fairy-subject-card:hover .subject-icon-box {
    transform: scale(1.15) rotate(6deg);
    box-shadow: 0 0 35px var(--spidey-cyan);
}

.fairy-subject-card h3 {
    font-size: 1.45rem;
    color: #ffffff;
    font-weight: 900;
    margin-bottom: 6px;
    text-shadow: 0 0 15px rgba(230, 0, 38, 0.85);
}

.fairy-subject-card p {
    font-size: 0.95rem;
    color: #f1f5f9;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.subject-card-btn {
    background: linear-gradient(135deg, var(--spidey-red), var(--spidey-blue));
    color: #ffffff;
    border: 1.5px solid var(--spidey-cyan);
    border-radius: 30px;
    padding: 9px 22px;
    font-weight: 800;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(230, 0, 38, 0.45);
    transition: all 0.25s ease;
}

.fairy-subject-card:hover .subject-card-btn {
    background: linear-gradient(135deg, var(--spidey-cyan), var(--spidey-red));
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 0 22px rgba(0, 210, 255, 0.9);
}

/* =========================================================
   SPIDER-SENSE & HEROIC STAGE LIGHTING 🕷️⚡✨
========================================================= */
.magic-glow-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    box-shadow: inset 0 0 120px rgba(230, 0, 38, 0.85), inset 0 0 180px rgba(0, 102, 255, 0.75), inset 0 0 220px rgba(0, 210, 255, 0.65);
    animation: spideyAuraPulse 1.2s ease-in-out infinite alternate;
    transition: opacity 0.8s ease;
}

@keyframes spideyAuraPulse {
    0% {
        box-shadow: inset 0 0 100px rgba(230, 0, 38, 0.85), inset 0 0 180px rgba(0, 102, 255, 0.75);
        background: radial-gradient(circle at 50% 10%, rgba(230, 0, 38, 0.3), transparent 70%);
    }
    50% {
        box-shadow: inset 0 0 140px rgba(0, 210, 255, 0.95), inset 0 0 200px rgba(255, 215, 0, 0.8);
        background: radial-gradient(circle at 50% 50%, rgba(0, 210, 255, 0.3), transparent 75%);
    }
    100% {
        box-shadow: inset 0 0 120px rgba(0, 102, 255, 0.9), inset 0 0 190px rgba(230, 0, 38, 0.85);
        background: radial-gradient(circle at 50% 90%, rgba(255, 215, 0, 0.3), transparent 70%);
    }
}

.user-avatar-glow.magic-active {
    animation: spideyHeroGlow 1.2s ease-in-out infinite alternate !important;
}

@keyframes spideyHeroGlow {
    0% {
        transform: scale(1.18) rotate(0deg);
        box-shadow: 0 0 45px var(--spidey-red), 0 0 75px var(--spidey-blue), 0 0 105px var(--spidey-cyan);
    }
    100% {
        transform: scale(1.28) rotate(8deg);
        box-shadow: 0 0 65px var(--spidey-cyan), 0 0 95px var(--spidey-gold), 0 0 135px var(--spidey-red-glow);
    }
}

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

@keyframes spideyHeroFloatMotion {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-7px) scale(1.01); }
    100% { transform: translateY(4px) scale(1); }
}

.magic-sparkle-card {
    animation: spideyCardSparkle 1.2s ease-in-out infinite alternate !important;
}

@keyframes spideyCardSparkle {
    0% {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 30px rgba(230, 0, 38, 0.75);
        transform: translateY(-4px);
    }
    100% {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 50px rgba(0, 210, 255, 0.95);
        transform: translateY(-10px) scale(1.03);
    }
}

/* =========================================================
   Toast Notification & Shake
========================================================= */
.toast {
    position: fixed;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, rgba(20, 32, 64, 0.96), rgba(8, 12, 24, 0.98));
    border: 2px solid var(--spidey-cyan);
    padding: 14px 28px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.85), 0 0 30px rgba(230, 0, 38, 0.75);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10000;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 22px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* =========================================================
   Subscription Expired Locked Screen ⚠️🔒
========================================================= */
.expired-box {
    background: linear-gradient(145deg, rgba(35, 10, 20, 0.95), rgba(15, 20, 40, 0.96));
    border: 2px solid rgba(230, 0, 38, 0.85);
    border-radius: 24px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 15px 45px rgba(230, 0, 38, 0.4), inset 0 0 30px rgba(230, 0, 38, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    margin: 15px auto 0;
    max-width: 480px;
    animation: expiredBoxAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    overflow: hidden;
}

.expired-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230, 0, 38, 0.12) 0%, transparent 65%);
    pointer-events: none;
    animation: spideyRadarSweep 8s linear infinite;
}

@keyframes expiredBoxAppear {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.expired-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(230, 0, 38, 0.4) 0%, rgba(255, 215, 0, 0.15) 100%);
    border: 2px solid #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5), 0 0 40px rgba(230, 0, 38, 0.5);
    animation: expiredIconPulse 2s ease-in-out infinite alternate;
}

@keyframes expiredIconPulse {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
    100% { transform: scale(1.08); box-shadow: 0 0 35px rgba(230, 0, 38, 0.8), 0 0 50px rgba(255, 215, 0, 0.7); }
}

.expired-icon {
    font-size: 42px;
    line-height: 1;
}

.expired-title {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 14px;
    color: #ff4d6d;
    text-shadow: 0 0 18px rgba(255, 77, 109, 0.8);
    letter-spacing: 0.5px;
}

.expired-text {
    font-size: 1.15rem;
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: 25px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 36px;
    border-radius: 50px;
    background: linear-gradient(135deg, #e60026 0%, #990017 50%, #0066ff 100%);
    border: 2px solid #ffd700;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 30px rgba(230, 0, 38, 0.6), 0 0 20px rgba(255, 215, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.contact-btn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 40px rgba(230, 0, 38, 0.85), 0 0 35px rgba(255, 215, 0, 0.8);
    border-color: #00d2ff;
    color: #ffffff !important;
}

.contact-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.contact-btn-icon {
    font-size: 1.3rem;
}

.contact-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: rotate(30deg) translateX(-100%);
    animation: contactShineMove 3.5s infinite;
    pointer-events: none;
}

@keyframes contactShineMove {
    0%, 70% { transform: rotate(30deg) translateX(-100%); }
    100% { transform: rotate(30deg) translateX(100%); }
}

/* =========================================================
   Footer Copyright
========================================================= */
.footer-copyright {
    text-align: center;
    margin: 25px 0 15px 0;
}

.footer-copyright a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    transition: all 0.25s ease;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(16, 26, 50, 0.5);
    border: 1px solid rgba(230, 0, 38, 0.45);
}

.footer-copyright a:hover {
    color: var(--spidey-cyan) !important;
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.95) !important;
    border-color: var(--spidey-cyan);
    background: rgba(24, 40, 78, 0.7);
}

/* =========================================================
   Responsive Breakpoints
========================================================= */
@media (max-width: 768px) {
    .fairy-header {
        padding: 0.6rem 1rem;
        flex-wrap: wrap;
    }
    .magical-title {
        font-size: 1.25rem;
    }
    .spidey-hud-banner {
        flex-wrap: wrap;
        gap: 8px 12px;
        padding: 8px 16px;
        border-radius: 24px;
    }
    .hud-divider {
        display: none;
    }
    .hero-badges-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .fairy-hud-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 8px 12px;
    }
    .glass-card {
        padding: 30px 20px;
    }
    .fairy-subjects-grid {
        grid-template-columns: 1fr;
    }
}
