/* ═══════════════════════════════════════════════════════════════════════════
   IMMUNE DEFENSE V5 - EDITION ULTIME COMPLETE
   Feuille de Style Complete - Version Francaise Amelioree
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════
   CSS VARIABLES
   ═══════════════════════════════════════════ */
:root {
    /* Couleurs Primaires */
    --primary: #22c55e;
    --secondary: #86efac;
    --attack: #ff4444;
    --defense: #0088ff;
    --support: #4ade80;
    --gold: #ffd700;


    /* Couleurs de Fond */
    --bg-dark: #030f07;
    --bg-card: #071a0f;
    --bg-panel: #0a2218;
    --bg-hover: #133620;


    /* Couleurs de Texte */
    --text: #ffffff;
    --text-muted: #888888;
    --text-dim: #555555;


    /* Couleurs de Rarete */
    --common: #b0b0b0;
    --uncommon: #4ade80;
    --rare: #3b82f6;
    --super-rare: #a855f7;
    --epic: #f97316;
    --legendary: #fbbf24;
    --mythic: #ec4899;
    --divine: #14b8a6;
    --celestial: #6366f1;
    --cosmic: #8b5cf6;
    --transcendent: #ff0080;


    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-gold: linear-gradient(135deg, #ffd700, #ffaa00);
    --gradient-attack: linear-gradient(135deg, #ff4444, #cc0000);
    --gradient-defense: linear-gradient(135deg, #0088ff, #0055cc);
    --gradient-support: linear-gradient(135deg, #22c55e, #16a34a);
    --gradient-bg: linear-gradient(135deg, #030f07 0%, #071a0f 50%, #030f07 100%);


    /* Tailles */
    --card-width: 180px;
    --card-height: 250px;
    --border-radius: 12px;
    --border-radius-sm: 8px;


    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}


/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


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


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


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


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


@keyframes slotSpin {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}


@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateY(180deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotateY(90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}


@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
    }
    50% {
        box-shadow: 0 0 20px currentColor, 0 0 40px currentColor, 0 0 60px currentColor;
    }
}


@keyframes powerUpFlash {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}


@keyframes readyGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 255, 136, 0.3);
    }
    50% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 136, 0.6), 0 0 30px rgba(0, 255, 136, 0.3);
    }
}


@keyframes slotRemove {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.5) rotate(10deg); opacity: 0; }
}


@keyframes deckConfirmTransition {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); filter: brightness(1.5); }
    100% { opacity: 0; transform: scale(0.9); filter: brightness(2); }
}


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


@keyframes cinematicFadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}


@keyframes cinematicParticle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 0.8; transform: scale(1); }
}


@keyframes bossDeathFlash {
    0% { opacity: 0.8; }
    30% { opacity: 1; }
    100% { opacity: 0; }
}


@keyframes comboShow {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}


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


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


@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}


@keyframes victoryFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}


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


@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}


@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(100px, -50px) rotate(90deg); }
    50% { transform: translate(50px, -100px) rotate(180deg); }
    75% { transform: translate(-50px, -50px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}


@keyframes cellFloat {
    0% { transform: translate(0, 100vh) scale(0); opacity: 0; }
    10% { opacity: 0.6; transform: scale(1); }
    90% { opacity: 0.6; }
    100% { transform: translate(0, -100vh) scale(0.5); opacity: 0; }
}


@keyframes virusFloat {
    0% { transform: translate(100vw, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translate(-100vw, 0) rotate(720deg); opacity: 0; }
}


@keyframes particleFloat {
    0% { transform: translate(0, 0) scale(1); opacity: 0.8; }
    50% { transform: translate(var(--tx), var(--ty)) scale(1.5); opacity: 0.4; }
    100% { transform: translate(calc(var(--tx) * 2), calc(var(--ty) * 2)) scale(0.5); opacity: 0; }
}


@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 30px var(--primary);
    }
    50% {
        text-shadow: 0 0 20px var(--primary), 0 0 40px var(--secondary), 0 0 60px var(--secondary);
    }
}


@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }
}


@keyframes iconBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    50% { transform: scale(1) rotate(0deg); }
    75% { transform: scale(1.2) rotate(10deg); }
}


@keyframes rainbowBorder {
    0% { border-color: #ff0000; }
    17% { border-color: #ff8800; }
    33% { border-color: #ffff00; }
    50% { border-color: #00ff00; }
    67% { border-color: #0088ff; }
    83% { border-color: #8800ff; }
    100% { border-color: #ff0000; }
}


/* ═══════════════════════════════════════════
   ANIMATED BACKGROUND
   ═══════════════════════════════════════════ */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background: radial-gradient(ellipse at center, #071a0f 0%, #030f07 70%);
}


.bg-cell {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: cellFloat 20s infinite linear;
}


.bg-cell:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 18s; }
.bg-cell:nth-child(2) { left: 25%; animation-delay: -4s; animation-duration: 22s; }
.bg-cell:nth-child(3) { left: 40%; animation-delay: -8s; animation-duration: 20s; }
.bg-cell:nth-child(4) { left: 55%; animation-delay: -12s; animation-duration: 24s; }
.bg-cell:nth-child(5) { left: 70%; animation-delay: -2s; animation-duration: 19s; }
.bg-cell:nth-child(6) { left: 85%; animation-delay: -6s; animation-duration: 21s; }
.bg-cell:nth-child(7) { left: 15%; animation-delay: -10s; animation-duration: 23s; }
.bg-cell:nth-child(8) { left: 60%; animation-delay: -14s; animation-duration: 17s; }


.bg-virus {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(255, 68, 68, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: virusFloat 25s infinite linear;
}


.bg-virus:nth-child(9) { top: 20%; animation-delay: 0s; }
.bg-virus:nth-child(10) { top: 40%; animation-delay: -8s; }
.bg-virus:nth-child(11) { top: 60%; animation-delay: -16s; }
.bg-virus:nth-child(12) { top: 80%; animation-delay: -4s; }


.bg-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(134, 239, 172, 0.6);
    border-radius: 50%;
    --tx: 100px;
    --ty: -100px;
    animation: particleFloat 10s infinite ease-in-out;
}


.bg-particle:nth-child(13) { left: 20%; top: 30%; --tx: 150px; --ty: -80px; animation-delay: 0s; }
.bg-particle:nth-child(14) { left: 50%; top: 50%; --tx: -100px; --ty: -120px; animation-delay: -2s; }
.bg-particle:nth-child(15) { left: 80%; top: 20%; --tx: -80px; --ty: 100px; animation-delay: -4s; }
.bg-particle:nth-child(16) { left: 30%; top: 70%; --tx: 120px; --ty: -60px; animation-delay: -6s; }
.bg-particle:nth-child(17) { left: 70%; top: 80%; --tx: -60px; --ty: -140px; animation-delay: -3s; }
.bg-particle:nth-child(18) { left: 40%; top: 40%; --tx: 80px; --ty: 80px; animation-delay: -5s; }


/* ═══════════════════════════════════════════
   RESET & BASE STYLES
   ═══════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}


body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
}


/* ═══════════════════════════════════════════
   SCREEN MANAGEMENT
   ═══════════════════════════════════════════ */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
}


.screen.active {
    display: flex;
    animation: screenSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes screenSlideIn {
    0% { opacity: 0; transform: scale(0.95) translateY(15px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}


/* ═══════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════ */
#loading-screen {
    justify-content: center;
    align-items: center;
    background: transparent;
}


.loading-content {
    text-align: center;
    animation: fadeIn 1s ease;
}


.loading-logo {
    font-size: 120px;
    animation: float 2s ease-in-out infinite, iconBounce 3s ease-in-out infinite;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 30px rgba(34, 197, 94, 0.8));
}


.loading-title {
    font-size: 56px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: titleGlow 2s ease-in-out infinite;
}


.loading-subtitle {
    font-size: 20px;
    color: var(--secondary);
    margin-bottom: 40px;
    letter-spacing: 3px;
}


.loading-bar-container {
    width: 350px;
    height: 12px;
    background: var(--bg-card);
    border-radius: 6px;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}


.loading-bar {
    width: 0%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary);
}


.loading-text {
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 1px;
}


/* ═══════════════════════════════════════════
   TUTORIAL STYLES
   ═══════════════════════════════════════════ */
.tutorial-modal-content {
    text-align: center;
    max-width: 450px;
}


.tutorial-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}


.tutorial-modal-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.tutorial-modal-content p {
    color: var(--text-muted);
    margin-bottom: 10px;
    font-size: 16px;
}


.tutorial-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}


.tutorial-btn {
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-normal);
}


.tutorial-btn.yes {
    background: var(--gradient-primary);
    color: var(--text);
}


.tutorial-btn.yes:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
}


.tutorial-btn.no {
    background: var(--bg-panel);
    color: var(--text-muted);
    border: 2px solid var(--text-dim);
}


.tutorial-btn.no:hover {
    background: var(--bg-hover);
    color: var(--text);
}


.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 1500;
    pointer-events: none;
}


.tutorial-overlay.active {
    display: block;
}


.tutorial-box {
    position: absolute;
    background: var(--bg-card);
    border: 3px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 20px;
    max-width: 350px;
    pointer-events: auto;
    animation: slideIn 0.3s ease;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
}


.tutorial-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border: 15px solid transparent;
}


.tutorial-arrow.up {
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: var(--primary);
}


.tutorial-arrow.down {
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--primary);
}


.tutorial-arrow.left {
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: var(--primary);
}


.tutorial-arrow.right {
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: var(--primary);
}


.tutorial-content {
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
}


.tutorial-content h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 18px;
}


.tutorial-next-btn {
    width: 100%;
    padding: 12px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text);
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-fast);
}


.tutorial-next-btn:hover {
    transform: scale(1.02);
}


.tutorial-highlight {
    position: relative;
    z-index: 1501;
    animation: glowPulse 1s infinite;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.5) !important;
}


/* ═══════════════════════════════════════════
   MAIN MENU - GRID LAYOUT
   ═══════════════════════════════════════════ */
#main-menu {
    flex-direction: column;
    padding: 0;
    background: transparent;
    overflow: hidden;
}


/* ---- Top Bar (fixed) ---- */
.menu-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(10, 10, 30, 0.92);
    border-bottom: 1px solid rgba(34, 197, 94, 0.15);
    backdrop-filter: blur(16px);
    z-index: 10;
    flex-shrink: 0;
    animation: topbarSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes topbarSlide {
    0% { opacity: 0; transform: translateY(-100%); }
    100% { opacity: 1; transform: translateY(0); }
}
.menu-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar-logo {
    font-size: 28px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.5));
}
.topbar-title-group {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.topbar-title {
    font-size: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    margin: 0;
}
.topbar-version {
    font-size: 11px;
    color: var(--secondary);
    background: rgba(134, 239, 172, 0.15);
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}
.menu-topbar-stats {
    display: flex;
    gap: 6px;
}
.topbar-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.topbar-stat:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-2px);
}
.topbar-stat-icon {
    font-size: 16px;
}
.topbar-stat-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
}


/* ---- Scrollable Content ---- */
.menu-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 197, 94, 0.3) transparent;
}
.menu-scroll::-webkit-scrollbar {
    width: 6px;
}
.menu-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.menu-scroll::-webkit-scrollbar-thumb {
    background: rgba(34, 197, 94, 0.25);
    border-radius: 3px;
}
.menu-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 197, 94, 0.5);
}
.menu-bottom-spacer {
    height: 24px;
}


/* ---- Hero Section (Play button + daily) ---- */
.menu-hero {
    max-width: 600px;
    margin: 0 auto 16px;
    animation: menuFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}
@keyframes menuFadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}


.menu-play-btn {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 14px;
    padding: 16px 22px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: buttonPulse 2.5s ease-in-out infinite;
    box-shadow: 0 4px 24px rgba(34, 197, 94, 0.3);
    position: relative;
    overflow: hidden;
}
.menu-play-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}
.menu-play-btn:hover::before { left: 100%; }
.menu-play-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 48px rgba(34, 197, 94, 0.45);
}
.menu-play-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
}
.play-btn-icon {
    font-size: 36px;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
}
.play-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}
.play-btn-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
}
.play-btn-sub {
    font-size: 11px;
    opacity: 0.8;
}
.play-btn-arrow {
    font-size: 22px;
    opacity: 0.7;
    animation: arrowPulse 1.5s ease-in-out infinite;
}
@keyframes arrowPulse {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(5px); opacity: 1; }
}


.menu-hero-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.menu-daily-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 170, 0, 0.12));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    color: var(--gold);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.menu-daily-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 170, 0, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
}
.menu-challenge-btn {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(134, 239, 172, 0.1));
    border-color: rgba(34, 197, 94, 0.25);
    color: var(--primary);
}
.menu-challenge-btn:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(134, 239, 172, 0.18));
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.2);
}


/* ---- Section Labels ---- */
.menu-section {
    max-width: 600px;
    margin: 0 auto 14px;
    animation: menuFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.menu-section:nth-child(3) { animation-delay: 0.15s; }
.menu-section:nth-child(4) { animation-delay: 0.22s; }
.menu-section:nth-child(5) { animation-delay: 0.29s; }
.menu-section:nth-child(6) { animation-delay: 0.36s; }


.menu-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 8px;
    padding-left: 4px;
}


/* ---- Tile Grid (uniform buttons) ---- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}


.menu-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: rgba(20, 20, 45, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}
.menu-tile::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    transition: left 0.5s ease;
}
.menu-tile:hover::before { left: 100%; }
.menu-tile:hover {
    background: rgba(30, 30, 65, 0.95);
    border-color: var(--primary);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}
.menu-tile:active {
    transform: translateY(-1px) scale(0.97);
    transition-duration: 0.1s;
}
.tile-icon {
    font-size: 26px;
    filter: drop-shadow(0 0 5px currentColor);
}
.tile-text {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.tile-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: linear-gradient(135deg, #ff4444, #ff0066);
    color: white;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
    animation: newBadgePulse 2s infinite;
}
.tile-badge.soon {
    background: linear-gradient(135deg, #ff8800, #ff4400);
}


/* ═══════════════════════════════════════════════════
   MENU — UPGRADE INCR V2
   Per-section colours, featured tile, live dot, banner
═══════════════════════════════════════════════════ */

/* ── Section label: turn into flex row with trailing line ── */
.menu-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.28);
    margin-bottom: 10px;
    padding-left: 2px;
}
.menu-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(255,255,255,0.1), transparent);
    border-radius: 1px;
}

/* ── Per-section label colours ── */
.menu-section[data-section="principal"] .menu-section-label { color: rgba(34, 197, 94, 0.7); }
.menu-section[data-section="principal"] .menu-section-label::after { background: linear-gradient(to right, rgba(34, 197, 94, 0.35), transparent); }
.menu-section[data-section="craft"] .menu-section-label { color: rgba(134, 239, 172, 0.7); }
.menu-section[data-section="craft"] .menu-section-label::after { background: linear-gradient(to right, rgba(134, 239, 172, 0.35), transparent); }
.menu-section[data-section="combat"] .menu-section-label { color: rgba(255, 100, 80, 0.7); }
.menu-section[data-section="combat"] .menu-section-label::after { background: linear-gradient(to right, rgba(255, 100, 80, 0.35), transparent); }
.menu-section[data-section="progress"] .menu-section-label { color: rgba(255, 215, 0, 0.7); }
.menu-section[data-section="progress"] .menu-section-label::after { background: linear-gradient(to right, rgba(255, 215, 0, 0.35), transparent); }

/* ── Per-section tile top accent ── */
.menu-section[data-section="principal"] .menu-tile { border-top: 2px solid rgba(34, 197, 94, 0.2); }
.menu-section[data-section="craft"]     .menu-tile { border-top: 2px solid rgba(134, 239, 172, 0.2); }
.menu-section[data-section="combat"]    .menu-tile { border-top: 2px solid rgba(255, 100, 80, 0.2); }
.menu-section[data-section="progress"]  .menu-tile { border-top: 2px solid rgba(255, 215, 0, 0.2); }

/* ── Per-section hover glow ── */
.menu-section[data-section="principal"] .menu-tile:hover {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 10px 32px rgba(34, 197, 94, 0.3), inset 0 1px 0 rgba(0,212,255,0.12);
}
.menu-section[data-section="craft"] .menu-tile:hover {
    border-color: rgba(134, 239, 172, 0.6);
    box-shadow: 0 10px 32px rgba(134, 239, 172, 0.3), inset 0 1px 0 rgba(179,136,255,0.12);
}
.menu-section[data-section="combat"] .menu-tile:hover {
    border-color: rgba(255, 100, 80, 0.6);
    box-shadow: 0 10px 32px rgba(255, 100, 80, 0.3), inset 0 1px 0 rgba(255,100,80,0.12);
}
.menu-section[data-section="progress"] .menu-tile:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 10px 32px rgba(255, 215, 0, 0.28), inset 0 1px 0 rgba(255,215,0,0.12);
}

/* ── Featured tile (GACHA): spans 2 grid columns ── */
.menu-tile--featured {
    grid-column: span 2;
    flex-direction: row;
    justify-content: flex-start;
    padding: 16px 20px;
    gap: 14px;
    background: linear-gradient(135deg, rgba(134, 239, 172, 0.13), rgba(34, 197, 94, 0.08));
    border: 1.5px solid rgba(134, 239, 172, 0.3);
    border-top: 2px solid rgba(134, 239, 172, 0.55) !important;
}
.menu-tile--featured .tile-icon { font-size: 30px; }
.menu-tile--featured .tile-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}
.menu-tile--featured .tile-text { font-size: 14px; letter-spacing: 2px; }
.menu-tile--featured .tile-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.42);
    letter-spacing: 0.4px;
    font-weight: 500;
    text-transform: none;
}
.menu-tile--featured:hover {
    border-color: rgba(134, 239, 172, 0.7) !important;
    box-shadow: 0 12px 38px rgba(134, 239, 172, 0.35), inset 0 1px 0 rgba(179,136,255,0.15) !important;
}

/* ── Animated LIVE dot (on MULTI tile) ── */
.tile-live-dot {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.9);
    animation: livePulse 1.8s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); transform: scale(1); }
    50%       { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); transform: scale(1.15); }
}

/* ── Scrolling promo banner ── */
.menu-promo-strip {
    max-width: 600px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, rgba(134, 239, 172, 0.07), rgba(34, 197, 94, 0.07));
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: 10px;
    overflow: hidden;
    padding: 7px 0;
}
.promo-strip-inner {
    display: flex;
    gap: 20px;
    white-space: nowrap;
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    font-weight: 600;
    padding: 0 16px;
    animation: promoScroll 24s linear infinite;
    will-change: transform;
}
.promo-sep { opacity: 0.22; }
@keyframes promoScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.menu-promo-strip:hover .promo-strip-inner { animation-play-state: paused; }

/* ── Topbar stat shimmer on hover ── */
.topbar-stat { overflow: hidden; position: relative; }
.topbar-stat::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transform: translateX(-100%);
    transition: transform 0.45s ease;
    pointer-events: none;
}
.topbar-stat:hover::after { transform: translateX(100%); }
.topbar-stat:nth-child(1):hover { border-color: rgba(255, 215, 0, 0.35); }
.topbar-stat:nth-child(2):hover { border-color: rgba(100, 180, 255, 0.35); }
.topbar-stat:nth-child(3):hover { border-color: rgba(255, 165, 0, 0.35); }
.topbar-stat:nth-child(4):hover { border-color: rgba(134, 239, 172, 0.35); }

/* ── Deeper JOUER button glow ring ── */
.menu-play-btn {
    animation: buttonPulse 2.5s ease-in-out infinite, playDeepGlow 3s ease-in-out infinite;
}
@keyframes playDeepGlow {
    0%, 100% { box-shadow: 0 4px 24px rgba(34, 197, 94, 0.3); }
    50%       { box-shadow: 0 8px 48px rgba(34, 197, 94, 0.55), 0 0 0 10px rgba(34, 197, 94, 0); }
}


/* Coming Soon Modal */
.coming-soon-content {
    text-align: center;
    max-width: 400px;
}


.coming-soon-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: shake 0.5s infinite;
}


.coming-soon-text {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 16px;
}


.coming-soon-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}


.feature-item {
    padding: 12px;
    background: var(--bg-panel);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


/* ═══════════════════════════════════════════
   SCREEN HEADER
   ═══════════════════════════════════════════ */
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(8, 10, 25, 0.95);
    border-bottom: 1px solid rgba(34, 197, 94, 0.12);
    flex-shrink: 0;
    backdrop-filter: blur(14px);
}


.screen-header h2 {
    font-size: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    flex: 1;
    text-align: center;
}


.level-header-info {
    text-align: center;
}


.level-header-info h2 {
    margin-bottom: 5px;
}


.level-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: normal;
}


.header-spacer {
    width: 80px;
}


/* Organ Complete Badge */
.organ-complete-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--support), #88ff88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    box-shadow: 0 0 15px rgba(68, 204, 68, 0.6);
    animation: pulse 2s infinite;
}


.organ-card.completed {
    border-color: var(--support);
    background: linear-gradient(145deg, rgba(30, 50, 35, 0.95), rgba(20, 40, 25, 0.95));
}


.back-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}


.back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--text);
    transform: translateX(-3px);
}


/* ═══════════════════════════════════════════
   FILTER TABS
   ═══════════════════════════════════════════ */
.filter-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(10, 12, 30, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}


.filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.5px;
}


.filter-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}


.filter-btn.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(134, 239, 172, 0.2));
    border-color: rgba(34, 197, 94, 0.4);
    color: var(--text);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.15);
}


/* ═══════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════ */
.search-bar {
    padding: 10px 20px 14px;
    background: rgba(10, 12, 30, 0.8);
    flex-shrink: 0;
}


.search-bar input {
    width: 100%;
    max-width: 400px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: all 0.25s ease;
}


.search-bar input:focus {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.12);
    background: rgba(255, 255, 255, 0.05);
}


.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}


/* ═══════════════════════════════════════════
   ORGANS GRID
   ═══════════════════════════════════════════ */
.organs-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    padding: 30px;
}


.organ-card {
    width: 220px;
    padding: 30px 20px;
    background: rgba(26, 26, 46, 0.95);
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}


.organ-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 40%, rgba(34, 197, 94, 0.1) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}


.organ-card:hover:not(.locked)::before {
    opacity: 1;
}


.organ-card:hover:not(.locked) {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(34, 197, 94, 0.3);
}


.organ-card.locked {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}


.organ-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
}


.organ-icon {
    font-size: 70px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px currentColor);
    animation: float 3s ease-in-out infinite;
}


.organ-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.organ-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 15px;
}


.organ-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width var(--transition-normal);
}


/* ═══════════════════════════════════════════
   LEVELS GRID
   ═══════════════════════════════════════════ */
.organ-progress {
    padding: 8px 16px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 20px;
    font-size: 14px;
    color: var(--primary);
    border: 2px solid var(--primary);
}


.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 20px;
}


/* ═══════════════════════════════════════════
   NIVEAU SCREEN - DESIGN AMELIORE
   ═══════════════════════════════════════════ */
.level-card {
    padding: 25px 20px;
    background: linear-gradient(145deg, rgba(30, 30, 55, 0.98), rgba(20, 20, 40, 0.98));
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


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


.level-card:hover::before {
    left: 100%;
}


.level-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}


.level-card:hover::after {
    transform: scaleX(1);
}


.level-card:hover:not(.locked) {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--primary);
    box-shadow:
        0 20px 50px rgba(34, 197, 94, 0.3),
        0 0 30px rgba(34, 197, 94, 0.2),
        inset 0 0 30px rgba(34, 197, 94, 0.05);
}


.level-card.locked {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}


.level-card.locked::after {
    display: none;
}


.level-card.completed {
    border-color: rgba(68, 204, 68, 0.6);
    background: linear-gradient(145deg, rgba(30, 50, 35, 0.98), rgba(20, 40, 25, 0.98));
}


.level-card.completed::after {
    background: var(--support);
}


.level-card.completed:hover:not(.locked) {
    box-shadow:
        0 20px 50px rgba(68, 204, 68, 0.3),
        0 0 30px rgba(68, 204, 68, 0.2);
}


.level-card.boss {
    border-color: rgba(255, 100, 50, 0.6);
    background: linear-gradient(145deg, rgba(50, 25, 25, 0.98), rgba(40, 20, 20, 0.98));
    animation: bossCardPulse 2s infinite;
}


.level-card.boss::after {
    background: linear-gradient(90deg, var(--attack), var(--gold), var(--attack));
    height: 5px;
}


@keyframes bossCardPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 68, 68, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 68, 68, 0.6), 0 0 60px rgba(255, 215, 0, 0.3); }
}


.level-number {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-shadow: none;
    filter: drop-shadow(0 2px 10px rgba(34, 197, 94, 0.4));
}


.level-card.boss .level-number {
    background: linear-gradient(135deg, var(--attack), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 10px rgba(255, 68, 68, 0.5));
}


.level-card.completed .level-number {
    background: linear-gradient(135deg, var(--support), #88ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.level-name {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}


.level-card.boss .level-name {
    color: var(--gold);
    font-size: 14px;
}


.level-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 24px;
}


.star {
    color: rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: none;
}


.star.earned {
    color: var(--gold);
    filter: drop-shadow(0 0 8px var(--gold)) drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
    animation: starShine 2s infinite;
}


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


.level-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 45px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
    z-index: 5;
}


/* Badge de difficulte */
.level-difficulty {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}


.level-difficulty.easy { background: var(--support); }
.level-difficulty.medium { background: var(--gold); color: #000; }
.level-difficulty.hard { background: var(--attack); }
.level-difficulty.extreme { background: linear-gradient(90deg, var(--attack), var(--mythic)); }


/* Rewards preview */
.level-rewards-preview {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.7;
}


/* ═══════════════════════════════════════════
   TISSUE SCREEN - ECRAN INTERMEDIAIRE
   ═══════════════════════════════════════════ */
#tissue-screen {
    background: var(--gradient-bg);
}


.tissue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}


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


.tissue-organ-icon {
    font-size: 60px;
    filter: drop-shadow(0 0 20px currentColor);
}


.tissue-organ-name {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.tissue-organ-desc {
    color: var(--text-muted);
    font-size: 14px;
}


.tissue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}


.tissue-card {
    background: linear-gradient(145deg, rgba(30, 30, 55, 0.95), rgba(20, 20, 40, 0.95));
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}


.tissue-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}


.tissue-card:hover::before {
    opacity: 1;
}


.tissue-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(34, 197, 94, 0.3);
}


.tissue-card.locked {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.6);
}


.tissue-icon {
    font-size: 50px;
    margin-bottom: 15px;
    display: block;
}


.tissue-name {
    font-size: 22px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 8px;
}


.tissue-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.4;
}


.tissue-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}


.tissue-progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}


.tissue-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width 0.5s ease;
}


.tissue-progress-text {
    font-size: 14px;
    font-weight: bold;
    color: var(--primary);
    min-width: 45px;
}


.tissue-levels-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}


.tissue-stars {
    display: flex;
    gap: 3px;
    margin-top: 10px;
    font-size: 16px;
}


/* ═══════════════════════════════════════════
   SPIN SCREEN
   ═══════════════════════════════════════════ */
.spin-count {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 25px;
    font-size: 20px;
    font-weight: bold;
    color: var(--gold);
    border: 2px solid var(--gold);
}


.spin-machine {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}


.spin-display {
    width: 220px;
    height: 300px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(34, 197, 94, 0.1));
    border: 4px solid var(--primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.4), inset 0 0 50px rgba(34, 197, 94, 0.1);
}


.spin-slot {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


.slot-card {
    font-size: 100px;
    color: var(--text-muted);
    filter: drop-shadow(0 0 20px currentColor);
}


.spin-result {
    margin-top: 25px;
    min-height: 120px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 850px;
}


.spin-buttons {
    display: flex;
    gap: 25px;
    padding: 20px;
    flex-shrink: 0;
}


.spin-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.3);
}


.spin-btn:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(34, 197, 94, 0.5);
}


.spin-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}


.spin-btn.premium {
    background: var(--gradient-gold);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}


.spin-btn.premium:hover:not(:disabled) {
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5);
}


.btn-cost {
    font-size: 14px;
    opacity: 0.9;
}


.rarity-rates {
    padding: 20px;
    background: rgba(22, 33, 62, 0.95);
    flex-shrink: 0;
}


.rarity-rates h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-muted);
}


.rates-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}


.rate {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}


.rate.common { background: var(--common); color: #000; }
.rate.uncommon { background: var(--uncommon); color: #000; }
.rate.rare { background: var(--rare); color: #fff; }
.rate.super-rare { background: var(--super-rare); color: #fff; }
.rate.epic { background: var(--epic); color: #fff; }
.rate.legendary { background: var(--legendary); color: #000; }
.rate.mythic { background: var(--mythic); color: #fff; }
.rate.divine { background: var(--divine); color: #fff; }
.rate.celestial { background: var(--celestial); color: #fff; }
.rate.cosmic { background: var(--cosmic); color: #fff; }
.rate.transcendent { background: var(--transcendent); color: #fff; animation: rainbowBorder 3s linear infinite; }


/* ═══════════════════════════════════════════
   COLLECTION GRID
   ═══════════════════════════════════════════ */
.collection-count {
    padding: 8px 16px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 20px;
    font-size: 14px;
    color: var(--primary);
    border: 2px solid var(--primary);
}


/* ═══════════════════════════════════════════
   CARD STYLES - ENHANCED
   ═══════════════════════════════════════════ */
.game-card {
    width: 100%;
    max-width: var(--card-width);
    aspect-ratio: 0.68;
    background: linear-gradient(145deg, rgba(18, 18, 40, 0.98), rgba(12, 12, 30, 0.98));
    border: 2px solid var(--common);
    border-radius: var(--border-radius);
    padding: 10px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}


.game-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    pointer-events: none;
}


.game-card:hover::before {
    top: -100%;
    left: -100%;
}


.game-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    z-index: 2;
}


.game-card.not-owned {
    opacity: 0.2;
    filter: grayscale(0.85);
}


.game-card.not-owned:hover {
    opacity: 0.4;
    filter: grayscale(0.4);
}


/* Rarity border colors + inner glow for high rarity */
.game-card.common { border-color: var(--common); }
.game-card.uncommon { border-color: var(--uncommon); }
.game-card.rare { border-color: var(--rare); box-shadow: inset 0 0 20px rgba(68, 136, 255, 0.06); }
.game-card.super-rare { border-color: var(--super-rare); box-shadow: inset 0 0 20px rgba(170, 68, 255, 0.08); }
.game-card.epic { border-color: var(--epic); box-shadow: inset 0 0 25px rgba(255, 136, 0, 0.08); }
.game-card.legendary {
    border-color: var(--legendary);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15), inset 0 0 25px rgba(255, 215, 0, 0.06);
    animation: glowPulse 2.5s infinite;
}
.game-card.mythic {
    border-color: var(--mythic);
    box-shadow: 0 0 18px rgba(255, 68, 170, 0.15), inset 0 0 30px rgba(255, 68, 170, 0.06);
    animation: glowPulse 2s infinite;
}
.game-card.divine {
    border-color: var(--divine);
    box-shadow: 0 0 20px rgba(136, 200, 255, 0.15), inset 0 0 30px rgba(136, 200, 255, 0.06);
    animation: glowPulse 1.8s infinite;
}
.game-card.celestial {
    border-color: var(--celestial);
    box-shadow: 0 0 22px rgba(100, 100, 255, 0.2), inset 0 0 30px rgba(100, 100, 255, 0.08);
    animation: glowPulse 1.5s infinite;
    background: linear-gradient(145deg, rgba(18, 18, 50, 0.98), rgba(25, 20, 60, 0.98));
}
.game-card.cosmic {
    border-color: var(--cosmic);
    box-shadow: 0 0 25px rgba(180, 0, 255, 0.2), inset 0 0 35px rgba(180, 0, 255, 0.08);
    animation: glowPulse 1.2s infinite;
    background: linear-gradient(145deg, rgba(20, 10, 45, 0.98), rgba(30, 15, 55, 0.98));
}
.game-card.transcendent {
    border-color: var(--transcendent);
    animation: glowPulse 1s infinite, rainbowBorder 3s linear infinite;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(255, 0, 128, 0.1));
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.2), inset 0 0 40px rgba(255, 0, 128, 0.08);
}


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


.card-cost {
    width: 30px;
    height: 30px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}


.card-type {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.card-type.attack { background: var(--gradient-attack); }
.card-type.defense { background: var(--gradient-defense); }
.card-type.support { background: var(--gradient-support); }


.card-icon {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 55px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
}


.card-name {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.card-stats {
    display: flex;
    justify-content: space-around;
    font-size: 12px;
    margin-bottom: 5px;
}


.card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}


.card-cost-bottom {
    text-align: center;
    padding: 5px;
    background: var(--gradient-gold);
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
    color: #000;
    margin-top: auto;
}


.card-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 3px 10px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    font-size: 12px;
    color: var(--gold);
    font-weight: bold;
    border: 1px solid var(--gold);
}


.card-rarity {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}


/* Mini card for deck/fusion */
.game-card.mini {
    max-width: 85px;
    padding: 6px;
}


.game-card.mini .card-icon {
    font-size: 32px;
}


.game-card.mini .card-name {
    font-size: 9px;
}


.game-card.mini .card-header,
.game-card.mini .card-stats {
    display: none;
}


.game-card.mini .card-cost-bottom {
    font-size: 9px;
    padding: 3px;
}


/* ═══════════════════════════════════════════
   FUSION SCREEN
   ═══════════════════════════════════════════ */
.fusion-info {
    padding: 18px 20px;
    background: rgba(22, 33, 62, 0.95);
    text-align: center;
    color: var(--secondary);
    font-size: 15px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(134, 239, 172, 0.2);
}


.fusion-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    flex-shrink: 0;
    background: radial-gradient(ellipse at center, rgba(134, 239, 172, 0.1) 0%, transparent 70%);
}


.fusion-slots {
    display: flex;
    align-items: center;
    gap: 15px;
}


.fusion-slot {
    width: 130px;
    height: 170px;
    background: rgba(26, 26, 46, 0.95);
    border: 3px dashed rgba(134, 239, 172, 0.4);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}


.fusion-slot:hover {
    border-color: var(--secondary);
    background: rgba(134, 239, 172, 0.1);
    transform: scale(1.05);
}


.fusion-slot.selected {
    border-color: var(--primary);
    border-style: solid;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
    animation: glowPulse 1s infinite;
}


.fusion-slot.filled {
    border-style: solid;
    border-color: var(--secondary);
}


.slot-placeholder {
    font-size: 45px;
    color: var(--text-dim);
}


.fusion-plus {
    font-size: 35px;
    color: var(--secondary);
    font-weight: bold;
}


.fusion-arrow {
    font-size: 50px;
    color: var(--secondary);
    margin: 20px 0;
    animation: bounce 1s infinite;
    filter: drop-shadow(0 0 10px var(--secondary));
}


.fusion-result-slot {
    width: 150px;
    height: 190px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(134, 239, 172, 0.15));
    border: 3px solid var(--secondary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 0 30px rgba(134, 239, 172, 0.3);
}


.fuse-btn {
    padding: 18px 60px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text);
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.3);
}


.fuse-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 10px 40px rgba(34, 197, 94, 0.5);
}


.fuse-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


.fusion-card-selection {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(22, 33, 62, 0.9);
}


.fusion-card-selection h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-muted);
}


.fusion-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}


/* ═══════════════════════════════════════════
   SHOP SCREEN
   ═══════════════════════════════════════════ */
.shop-currency {
    display: flex;
    gap: 25px;
    font-size: 16px;
    font-weight: bold;
}


.shop-currency span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 20px;
}


.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
}


.shop-item {
    background: linear-gradient(145deg, rgba(30, 30, 55, 0.95), rgba(20, 20, 40, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}


.shop-item .shop-item-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}


.shop-item:hover .shop-item-glow {
    opacity: 1;
}


.shop-item.premium {
    border-color: rgba(168, 85, 247, 0.4);
    background: linear-gradient(145deg, rgba(50, 30, 70, 0.95), rgba(30, 20, 50, 0.95));
}


.shop-item.premium:hover {
    border-color: #a855f7;
    box-shadow: 0 15px 50px rgba(168, 85, 247, 0.4);
}


.shop-item.hot-deal {
    border-color: rgba(255, 100, 50, 0.5);
    animation: hotGlow 2s ease-in-out infinite;
}


.shop-item.hot-deal .hot-badge {
    position: absolute;
    top: 10px;
    right: -30px;
    background: linear-gradient(90deg, #ff4400, #ff8800);
    color: white;
    padding: 5px 40px;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(45deg);
    box-shadow: 0 3px 10px rgba(255, 68, 0, 0.5);
}


.shop-item.cant-afford {
    opacity: 0.6;
}


.shop-item.owned {
    border-color: rgba(0, 255, 136, 0.5);
    background: linear-gradient(145deg, rgba(30, 70, 50, 0.95), rgba(20, 50, 40, 0.95));
}


.shop-item.owned:hover {
    border-color: #00ff88;
    box-shadow: 0 15px 50px rgba(0, 255, 136, 0.3);
}


.owned-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(90deg, #00cc66, #00ff88);
    color: #000;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0, 255, 136, 0.5);
}


.shop-item-status {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 10px;
}


.shop-buy-btn.owned-btn {
    background: linear-gradient(135deg, #00cc66, #00ff88);
    color: #000;
}


.shop-buy-btn.owned-btn:hover {
    background: linear-gradient(135deg, #00ff88, #44ffaa);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}


@keyframes hotGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 100, 50, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 100, 50, 0.6); }
}


.shop-item:hover {
    border-color: var(--primary);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(34, 197, 94, 0.3);
}


.shop-item-icon {
    font-size: 60px;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}


.shop-item:hover .shop-item-icon {
    transform: scale(1.15) rotate(-5deg);
}


.shop-item-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--primary);
}


.shop-item.premium .shop-item-name {
    color: #a855f7;
}


.shop-item-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}


.shop-item-cards {
    font-size: 12px;
    color: var(--gold);
    margin-bottom: 12px;
    padding: 5px 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    display: inline-block;
}


.shop-item-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}


.shop-item-price .price-gold {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}


.shop-item-price .price-gems {
    color: #a855f7;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}


.shop-buy-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00d4ff, #0088ff);
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text);
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 136, 255, 0.4);
}


.shop-buy-btn.premium {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}


.shop-buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 136, 255, 0.6);
}


.shop-buy-btn:disabled {
    background: linear-gradient(135deg, #444, #333);
    cursor: not-allowed;
    box-shadow: none;
}


@keyframes packBounce {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}


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


.shop-buy-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.3);
}


.shop-buy-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* ═══════════════════════════════════════════
   ACHIEVEMENTS SCREEN
   ═══════════════════════════════════════════ */
.achievement-count {
    padding: 8px 16px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 20px;
    font-size: 14px;
    color: var(--gold);
    border: 2px solid var(--gold);
}


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


.achievement-card {
    background: rgba(26, 26, 46, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 18px;
    display: flex;
    gap: 15px;
    transition: all var(--transition-normal);
}


.achievement-card:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}


.achievement-card.unlocked {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(255, 215, 0, 0.1));
}


.achievement-card:not(.unlocked) {
    opacity: 0.55;
}


.achievement-icon {
    font-size: 45px;
    flex-shrink: 0;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
}


.achievement-info {
    flex: 1;
}


.achievement-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 15px;
}


.achievement-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}


.achievement-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}


.achievement-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width var(--transition-normal);
}


.achievement-progress-text {
    font-size: 11px;
    color: var(--text-muted);
}


.achievement-reward {
    font-size: 13px;
    color: var(--gold);
    margin-top: 8px;
    font-weight: bold;
}


/* ═══════════════════════════════════════════
   QUESTS SCREEN
   ═══════════════════════════════════════════ */
.quests-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}


.quest-card {
    background: rgba(26, 26, 46, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition-normal);
}


.quest-card:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}


.quest-card.completed {
    border-color: var(--support);
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(68, 204, 68, 0.1));
}


.quest-icon {
    font-size: 45px;
    flex-shrink: 0;
}


.quest-info {
    flex: 1;
}


.quest-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary);
}


.quest-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}


.quest-progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-dark);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 6px;
}


.quest-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width var(--transition-normal);
}


.quest-progress-text {
    font-size: 12px;
    color: var(--text-muted);
}


.quest-reward {
    text-align: right;
    flex-shrink: 0;
}


.quest-reward-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: var(--gold);
    font-weight: bold;
}


.quest-claim-btn {
    margin-top: 12px;
    padding: 10px 25px;
    background: var(--gradient-gold);
    border: none;
    border-radius: var(--border-radius-sm);
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
}


.quest-claim-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}


.quest-claim-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* ═══════════════════════════════════════════
   STATS SCREEN
   ═══════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding: 20px;
}


.stat-card {
    background: rgba(26, 26, 46, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 25px 20px;
    text-align: center;
    transition: all var(--transition-normal);
}


.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.2);
}


.stat-card-icon {
    font-size: 45px;
    margin-bottom: 12px;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.4));
}


.stat-card-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}


.stat-card-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ═══════════════════════════════════════════
   DECK SELECTION SCREEN
   ═══════════════════════════════════════════ */
#deck-select-screen {
    background: linear-gradient(135deg, #030f07 0%, #0d2b18 50%, #030f07 100%);
}


#deck-select-screen.active {
    display: flex;
    flex-direction: column;
}


.deck-select-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid var(--primary);
}


.deck-select-header h2 {
    font-size: 28px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
}


.deck-select-info {
    font-size: 20px;
    color: var(--gold);
    font-weight: bold;
}


.deck-select-container {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}


/* Zone du deck sélectionné */
.selected-deck-area {
    width: 380px;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.selected-deck-area h3 {
    text-align: center;
    font-size: 22px;
    color: var(--primary);
}


.selected-deck-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    flex: 1;
}


.deck-slot {
    aspect-ratio: 3/4;
    background: rgba(0, 0, 0, 0.4);
    border: 3px dashed rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}


.deck-slot.empty span {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.3);
}


.deck-slot.empty:hover {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.1);
}


.deck-slot.filled {
    border: 3px solid var(--primary);
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.2), transparent);
    animation: slotFilled 0.5s ease;
}


.deck-slot.filled:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
    border-color: var(--attack);
}


.deck-slot .slot-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}


.deck-slot .slot-card-icon {
    font-size: 50px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
}


.deck-slot .slot-card-name {
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    margin-top: 8px;
    color: var(--text);
}


.deck-slot .slot-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    background: var(--attack);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}


.deck-slot.filled:hover .slot-remove {
    opacity: 1;
}


@keyframes slotFilled {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}


.start-battle-btn {
    padding: 20px;
    font-size: 22px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff4444, #ff8800);
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 5px 20px rgba(255, 68, 68, 0.4);
}


.start-battle-btn:disabled {
    background: linear-gradient(135deg, #444, #333);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}


.start-battle-btn:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(255, 68, 68, 0.6);
}


.start-battle-btn:not(:disabled):active {
    transform: translateY(0);
}


/* Zone de collection */
.deck-collection-area {
    flex: 1;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.deck-collection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


.deck-collection-header h3 {
    font-size: 20px;
    color: var(--secondary);
}


.deck-filter-tabs {
    display: flex;
    gap: 8px;
}


.deck-filter-tabs .filter-tab {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}


.deck-filter-tabs .filter-tab:hover {
    background: rgba(255, 255, 255, 0.2);
}


.deck-filter-tabs .filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
}


.deck-collection-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 20px;
    overflow-y: auto;
    align-content: start;
}


.collection-card-select {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}


.collection-card-select:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}


.collection-card-select.selected {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: cardSelected 0.3s ease;
}


.collection-card-select.in-deck {
    opacity: 0.4;
    pointer-events: none;
}


.collection-card-select .card-icon {
    font-size: 45px;
    text-align: center;
    margin-bottom: 8px;
}


.collection-card-select .card-name {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.collection-card-select .card-stats {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 11px;
}


.collection-card-select .card-rarity {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
}


.collection-card-select .card-special-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 16px;
    animation: specialGlow 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 5px gold);
}


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


@keyframes cardSelected {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}


/* ═══════════════════════════════════════════
   BOSS HEALTH BAR
   ═══════════════════════════════════════════ */
.boss-health-container {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 600px;
    z-index: 50;
    animation: bossHealthAppear 0.5s ease;
}


@keyframes bossHealthAppear {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}


.boss-name {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--attack);
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.8);
    margin-bottom: 8px;
    letter-spacing: 3px;
    text-transform: uppercase;
}


.boss-health-bar {
    height: 30px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    border: 3px solid var(--attack);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5);
}


.boss-health-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff0000, #ff4444, #ff8800);
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: inset 0 -5px 15px rgba(0, 0, 0, 0.3);
}


.boss-health-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 12px 12px 0 0;
}


.boss-health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}


/* ═══════════════════════════════════════════
   BOSS CINEMATIC
   ═══════════════════════════════════════════ */
.boss-cinematic {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.boss-cinematic.active {
    display: flex;
    animation: cinematicFadeIn 0.5s ease;
}


@keyframes cinematicFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}


.cinematic-content {
    text-align: center;
    position: relative;
    z-index: 2;
}


.cinematic-icon {
    font-size: 150px;
    animation: cinematicBoss 2s ease infinite;
    filter: drop-shadow(0 0 50px rgba(255, 0, 0, 0.8));
}


@keyframes cinematicBoss {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.1) translateY(-10px); }
}


.cinematic-name {
    font-size: 60px;
    font-weight: bold;
    color: var(--attack);
    text-shadow: 0 0 30px rgba(255, 68, 68, 0.8), 0 0 60px rgba(255, 68, 68, 0.5);
    margin-top: 20px;
    letter-spacing: 10px;
    text-transform: uppercase;
    animation: cinematicText 0.5s ease 0.3s both;
}


.cinematic-title {
    font-size: 24px;
    color: var(--gold);
    margin-top: 10px;
    font-style: italic;
    animation: cinematicText 0.5s ease 0.5s both;
}


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


.cinematic-bars {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}


.cinematic-bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    background: black;
}


.cinematic-bar.top {
    top: 0;
    animation: cinematicBarIn 0.5s ease both;
}


.cinematic-bar.bottom {
    bottom: 0;
    animation: cinematicBarIn 0.5s ease both;
}


@keyframes cinematicBarIn {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}


/* ═══════════════════════════════════════════
   SPECIAL ATTACK OVERLAY
   ═══════════════════════════════════════════ */
.special-attack-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 500;
    display: none;
}


.special-attack-overlay.active {
    display: block;
}


#special-attack-canvas {
    width: 100%;
    height: 100%;
}


/* Zoom effect on tower */
.tower-zoom-effect {
    position: fixed;
    border-radius: 50%;
    border: 4px solid var(--primary);
    box-shadow: 0 0 50px var(--primary), inset 0 0 30px rgba(34, 197, 94, 0.3);
    animation: towerZoom 1s ease forwards;
    pointer-events: none;
    z-index: 600;
}


@keyframes towerZoom {
    0% { transform: scale(5); opacity: 0; }
    30% { transform: scale(1); opacity: 1; }
    70% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.5); opacity: 0; }
}


/* Energy charge effect */
.energy-charge {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent);
    animation: energyCharge 0.8s ease forwards;
    pointer-events: none;
    z-index: 601;
}


@keyframes energyCharge {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}


/* ═══════════════════════════════════════════
   COMBAT SCREEN
   ═══════════════════════════════════════════ */
#combat-screen {
    background: #0d1117;
    position: fixed;
}


.combat-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 3px solid var(--primary);
    flex-shrink: 0;
    z-index: 10;
}


.hud-left {
    display: flex;
    align-items: center;
    gap: 25px;
}


.health-bar {
    width: 220px;
    height: 28px;
    background: var(--bg-dark);
    border: 3px solid var(--attack);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
}


.health-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--attack), #ff6666);
    transition: width var(--transition-fast);
}


.health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}


.wave-info {
    font-size: 16px;
    color: var(--text);
    font-weight: bold;
}


/* Indicateur de mutation */
.mutation-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #ff00ff;
    font-weight: bold;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(136, 0, 136, 0.3));
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 0, 255, 0.4);
    animation: mutationPulse 2s ease-in-out infinite;
    text-shadow: 0 0 8px rgba(255, 0, 255, 0.6);
}


.mutation-indicator .mutation-icon {
    font-size: 16px;
    animation: mutationSpin 3s linear infinite;
}


@keyframes mutationPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 0, 255, 0.3);
        border-color: rgba(255, 0, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 0, 255, 0.6);
        border-color: rgba(255, 0, 255, 0.8);
    }
}


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


.hud-center {
    flex: 1;
    text-align: center;
}


.level-name {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
}


.hud-right {
    display: flex;
    align-items: center;
    gap: 20px;
}


.combat-gold {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    color: var(--gold);
    padding: 8px 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 20px;
    border: 2px solid var(--gold);
}


.pause-btn {
    width: 45px;
    height: 45px;
    background: rgba(26, 26, 46, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}


.pause-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: scale(1.1);
}


/* Battlefield */
.battlefield-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 10px;
}


#battlefield {
    max-width: 100%;
    max-height: 100%;
    border: 3px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.2);
}


.combo-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 70px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.9), 0 0 60px rgba(255, 215, 0, 0.5);
    pointer-events: none;
    opacity: 0;
}


.combo-display.show {
    animation: comboShow 1.2s forwards;
}


/* Deck Bar */
.deck-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.9);
    border-top: 3px solid var(--primary);
    flex-shrink: 0;
}


.deck-card {
    width: 75px;
    height: 95px;
    background: rgba(26, 26, 46, 0.95);
    border: 3px solid var(--primary);
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}


.deck-card:hover:not(.on-cooldown) {
    transform: translateY(-15px);
    box-shadow: 0 15px 30px rgba(34, 197, 94, 0.4);
}


.deck-card.on-cooldown {
    opacity: 0.4;
    cursor: not-allowed;
}


.deck-card.selected {
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    transform: translateY(-10px);
}


.deck-card-icon {
    font-size: 32px;
}


.deck-card-cost {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
}


.deck-card-cost-text {
    position: absolute;
    bottom: 5px;
    font-size: 10px;
    color: var(--gold);
    font-weight: bold;
}


/* Power-ups Container */
.powerups-container {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 9000;
    pointer-events: auto !important;
}


.powerups-title {
    font-size: 11px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 1px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    border: 1px solid var(--gold);
}


/* Power-ups Bar */
.powerups-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto !important;
    z-index: 9001;
}


.powerup-btn {
    width: 65px;
    height: 65px;
    background: linear-gradient(145deg, rgba(40, 40, 70, 0.95), rgba(20, 20, 40, 0.95));
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), inset 0 2px 10px rgba(255, 255, 255, 0.1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 9002;
}


.powerup-btn:hover:not(.on-cooldown):not(:disabled):not(.disabled) {
    transform: scale(1.15);
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.6);
    background: rgba(34, 197, 94, 0.2);
}


.powerup-btn:active:not(:disabled):not(.disabled) {
    transform: scale(0.95);
}


.powerup-btn.on-cooldown {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
}


.powerup-btn:disabled,
.powerup-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 68, 68, 0.3);
}


.powerup-btn.active {
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    animation: glowPulse 1s infinite;
    background: rgba(255, 215, 0, 0.2);
}


/* Power-ups disponibles - glow subtil pour indiquer qu'ils sont prets */
.powerup-btn:not(.on-cooldown):not(.disabled):not(.no-gold) {
    animation: readyGlow 2s ease-in-out infinite;
    border-color: rgba(0, 255, 136, 0.6);
}


.powerup-icon {
    font-size: 24px;
    line-height: 1;
}


.powerup-cost {
    position: absolute;
    bottom: -10px;
    font-size: 9px;
    color: var(--gold);
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 5px;
    border-radius: 8px;
    white-space: nowrap;
}


.powerup-btn.no-gold {
    border-color: rgba(255, 68, 68, 0.4);
    opacity: 0.6;
}


.powerup-btn.no-gold .powerup-cost {
    color: var(--attack);
    animation: pulse 1s infinite;
}


.powerup-cooldown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: var(--text);
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: 8px;
}


/* Minimap */
.minimap-container {
    position: absolute;
    right: 25px;
    bottom: 120px;
    z-index: 5;
}


#minimap {
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid rgba(34, 197, 94, 0.4);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}


/* Pause Overlay */
.pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}


.pause-overlay.active {
    display: flex;
}


.pause-menu {
    background: rgba(26, 26, 46, 0.98);
    border: 3px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 50px;
    text-align: center;
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.4);
}


.pause-menu h2 {
    font-size: 42px;
    margin-bottom: 35px;
    color: var(--primary);
}


.pause-menu-btn {
    display: block;
    width: 220px;
    padding: 18px;
    margin: 12px auto;
    background: rgba(22, 33, 62, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-sm);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition-fast);
}


.pause-menu-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: scale(1.05);
}


/* ═══════════════════════════════════════════
   RESULT OVERLAY - VICTORY EPIQUE
   ═══════════════════════════════════════════ */
.result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    overflow: hidden;
}


.result-overlay.active {
    display: flex;
}


/* Confetti Container */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}


.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    top: -20px;
    animation: confettiFall linear forwards;
}


@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}


/* Light Rays Background */
.victory-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.1), transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: victoryRaysSpin 20s linear infinite;
    opacity: 0;
    z-index: 0;
}


.result-overlay.active .victory-rays {
    animation: victoryRaysSpin 20s linear infinite, victoryRaysFadeIn 1s ease forwards;
}


@keyframes victoryRaysSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}


@keyframes victoryRaysFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


.result-content {
    background: linear-gradient(145deg, rgba(30, 30, 55, 0.98), rgba(20, 20, 40, 0.98));
    border: 5px solid var(--primary);
    border-radius: 30px;
    padding: 60px 80px;
    text-align: center;
    animation: resultSlideIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 80px rgba(34, 197, 94, 0.5);
    position: relative;
    z-index: 10;
    overflow: visible;
}


@keyframes resultSlideIn {
    0% {
        transform: scale(0.3) translateY(100px);
        opacity: 0;
    }
    60% {
        transform: scale(1.1) translateY(-20px);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}


.result-content.victory {
    border-color: var(--gold);
    box-shadow:
        0 0 80px rgba(255, 215, 0, 0.5),
        0 0 120px rgba(255, 215, 0, 0.3),
        inset 0 0 60px rgba(255, 215, 0, 0.1);
}


.result-content.defeat {
    border-color: var(--attack);
    box-shadow: 0 0 60px rgba(255, 68, 68, 0.4);
}


.result-title {
    font-size: 65px;
    margin-bottom: 30px;
    font-weight: 900;
    letter-spacing: 3px;
}


.result-content.victory .result-title {
    background: linear-gradient(135deg, #ffd700, #ffaa00, #fff8dc, #ffd700);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: victoryTitleShine 3s ease infinite;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
}


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


.result-content.defeat .result-title {
    color: var(--attack);
    text-shadow: 0 0 30px rgba(255, 68, 68, 0.6);
}


/* Stars avec animation epic */
.result-stars {
    font-size: 70px;
    margin-bottom: 35px;
    display: flex;
    justify-content: center;
    gap: 20px;
}


.result-star {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
}


.result-star.earned {
    color: var(--gold);
    animation: starReveal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}


.result-star.empty {
    color: rgba(255, 255, 255, 0.2);
    animation: starRevealEmpty 0.4s ease forwards;
}


.result-star:nth-child(1) { animation-delay: 0.5s; }
.result-star:nth-child(2) { animation-delay: 0.8s; }
.result-star:nth-child(3) { animation-delay: 1.1s; }


@keyframes starReveal {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.5) rotate(20deg);
    }
    70% {
        transform: scale(0.9) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}


@keyframes starRevealEmpty {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}


/* Shine effect on earned stars */
.result-star.earned::after {
    content: '✦';
    position: absolute;
    font-size: 20px;
    color: white;
    animation: starSparkle 1s ease infinite;
}


@keyframes starSparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1); }
}


/* Rewards avec animation */
.result-rewards {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 40px;
}


.result-reward {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 32px;
    font-weight: bold;
    opacity: 0;
    transform: translateY(30px);
    animation: rewardReveal 0.5s ease forwards;
}


.result-reward:nth-child(1) { animation-delay: 1.5s; }
.result-reward:nth-child(2) { animation-delay: 1.7s; }
.result-reward:nth-child(3) { animation-delay: 1.9s; }


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


.result-reward .reward-icon {
    font-size: 50px;
    animation: rewardBounce 1s ease infinite;
    animation-delay: 2s;
}


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


.result-reward .reward-amount {
    font-size: 28px;
}


.result-reward.gold .reward-amount { color: var(--gold); }
.result-reward.spins .reward-amount { color: var(--primary); }
.result-reward.gems .reward-amount { color: var(--secondary); }


/* Bouton continuer */
.result-btn {
    padding: 20px 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50px;
    color: var(--text);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(34, 197, 94, 0.4);
    opacity: 0;
    transform: translateY(20px);
    animation: btnReveal 0.5s ease 2.2s forwards;
    text-transform: uppercase;
    letter-spacing: 2px;
}


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


.result-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 50px rgba(34, 197, 94, 0.6);
}


.result-content.victory .result-btn {
    background: linear-gradient(135deg, var(--gold), #ffaa00);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
}


.result-content.victory .result-btn:hover {
    box-shadow: 0 15px 50px rgba(255, 215, 0, 0.6);
}


/* New organ unlock banner */
.new-organ-unlocked {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(134, 239, 172, 0.2));
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 15px 30px;
    margin-bottom: 25px;
    animation: newOrganPulse 2s infinite;
}


@keyframes newOrganPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 40px rgba(34, 197, 94, 0.6); }
}


.new-organ-unlocked .unlock-icon {
    font-size: 40px;
    margin-bottom: 10px;
}


.new-organ-unlocked .unlock-text {
    font-size: 18px;
    color: var(--primary);
    font-weight: bold;
}


/* ═══════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}


.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}


.modal-content {
    background: rgba(26, 26, 46, 0.98);
    border: 3px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 35px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.4);
}


.pack-modal-content {
    text-align: center;
    min-width: 450px;
}


.pack-modal-content h2 {
    margin-bottom: 30px;
    color: var(--gold);
    font-size: 28px;
}


.pack-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-bottom: 30px;
}


.pack-card {
    animation: cardReveal 0.6s ease backwards;
}


.pack-card:nth-child(1) { animation-delay: 0.1s; }
.pack-card:nth-child(2) { animation-delay: 0.3s; }
.pack-card:nth-child(3) { animation-delay: 0.5s; }
.pack-card:nth-child(4) { animation-delay: 0.7s; }
.pack-card:nth-child(5) { animation-delay: 0.9s; }


.modal-close-btn {
    padding: 16px 45px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-normal);
}


.modal-close-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
}


/* Card Modal - Pokemon TCG Showcase */
.card-modal-content {
    width: auto;
    max-width: 850px;
    text-align: center;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}


.card-showcase {
    display: flex;
    align-items: stretch;
    gap: 0;
    animation: showcaseAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes showcaseAppear {
    0% { opacity: 0; transform: scale(0.7) rotateY(15deg); }
    50% { opacity: 1; }
    100% { transform: scale(1) rotateY(0); }
}


.showcase-card-side {
    flex: 0 0 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
}


.showcase-card-wrapper {
    position: relative;
    animation: showcaseCardFloat 4s ease-in-out infinite;
}
@keyframes showcaseCardFloat {
    0%, 100% { transform: translateY(0) rotateY(0); }
    25% { transform: translateY(-8px) rotateY(2deg); }
    75% { transform: translateY(4px) rotateY(-1deg); }
}


.showcase-card-wrapper .game-card {
    width: 220px;
    max-width: 220px;
    aspect-ratio: 0.68;
    font-size: 14px;
    pointer-events: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px var(--card-glow-color, rgba(0,212,255,0.3));
}
.showcase-card-wrapper .game-card .card-icon {
    font-size: 70px;
}


/* Holographic shine overlay */
.showcase-card-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius);
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(255,255,255,0.08) 45%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.08) 55%,
        transparent 70%
    );
    animation: holoShine 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes holoShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(35deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(35deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(35deg); }
}


.showcase-info-side {
    flex: 1;
    text-align: left;
    padding: 30px 35px;
    background: rgba(15, 15, 40, 0.95);
    border-radius: 0 16px 16px 0;
    border: 2px solid rgba(255,255,255,0.1);
    border-left: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 320px;
    backdrop-filter: blur(10px);
    animation: showcaseInfoSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}
@keyframes showcaseInfoSlide {
    0% { opacity: 0; transform: translateX(30px); }
    100% { opacity: 1; transform: translateX(0); }
}


.showcase-name {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}


.showcase-rarity-badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    width: fit-content;
}


.showcase-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    width: fit-content;
}


.showcase-desc {
    color: #bbb;
    font-size: 13px;
    line-height: 1.7;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}


.showcase-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}


.showcase-stat-box {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
}


.showcase-stat-val {
    font-size: 26px;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0,212,255,0.3);
}


.showcase-stat-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}


.showcase-special {
    background: rgba(255,255,255,0.04);
    border: 1px solid;
    border-radius: 10px;
    padding: 12px 14px;
}


.showcase-special-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}


.showcase-special-icon {
    font-size: 22px;
}


.showcase-special-name {
    font-weight: 800;
    font-size: 14px;
}


.showcase-special-desc {
    color: #aaa;
    font-size: 12px;
    line-height: 1.5;
}


.showcase-special-cd {
    font-size: 11px;
    color: var(--primary);
    margin-top: 4px;
}


.showcase-owned {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}


.showcase-owned-count {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold);
}


.showcase-close-btn {
    padding: 10px 30px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}


.showcase-close-btn:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08));
    transform: scale(1.05);
}


/* ─── COLLECTION GRID ENHANCED ─── */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 10px;
    padding: 14px 18px;
    position: relative;
    z-index: 1;
}
/* ═══════════════════════════════════════════
   COLLECTION SCREEN - CARD LIBRARY THEME
   ═══════════════════════════════════════════ */
#collection-screen {
    background: linear-gradient(160deg, #08081e, #0d0d30, #0a0825);
}
#collection-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(134, 239, 172, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 15%, rgba(34, 197, 94, 0.04) 0%, transparent 50%);
    pointer-events: none;
}
#collection-screen .screen-header {
    background: rgba(8, 8, 25, 0.95);
    border-bottom: 1px solid rgba(134, 239, 172, 0.15);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 10;
}
#collection-screen .collection-count {
    background: rgba(134, 239, 172, 0.12);
    border: 1px solid rgba(134, 239, 172, 0.25);
    color: var(--secondary);
    padding: 5px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}


/* ─── LEVEL LOADING SCREEN ─── */
@keyframes levelLoadPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}
@keyframes levelLoadBarShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes levelLoadOrganRotate {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.05); }
    50% { transform: rotate(0deg) scale(1); }
    75% { transform: rotate(-5deg) scale(1.05); }
    100% { transform: rotate(0deg) scale(1); }
}
@keyframes levelLoadFadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes dnaHelixSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}


.level-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    animation: fadeIn 0.3s ease;
}


.level-loading-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}


.level-loading-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: levelLoadFadeUp 0.6s ease;
}


.level-loading-organ {
    font-size: 100px;
    margin-bottom: 15px;
    animation: levelLoadOrganRotate 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px currentColor);
}


.level-loading-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 6px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.5);
}


.level-loading-subtitle {
    font-size: 16px;
    color: #aaa;
    margin-bottom: 25px;
    letter-spacing: 1px;
}


.level-loading-bar-container {
    width: 320px;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 1px solid rgba(255,255,255,0.15);
}


.level-loading-bar {
    width: 0%;
    height: 100%;
    border-radius: 4px;
    transition: width 0.2s ease;
    background-size: 200% 100%;
    animation: levelLoadBarShimmer 1.5s linear infinite;
}


.level-loading-tip {
    font-size: 13px;
    color: #777;
    font-style: italic;
    max-width: 350px;
    line-height: 1.5;
    animation: levelLoadFadeUp 0.6s ease 0.3s backwards;
}


.level-loading-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}


.level-loading-particle {
    position: absolute;
    border-radius: 50%;
    animation: levelParticleFloat linear infinite;
    opacity: 0.4;
}
@keyframes levelParticleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    20% { opacity: 0.5; }
    80% { opacity: 0.3; }
    100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}


.card-detail {
    margin-bottom: 25px;
}


.card-detail-icon {
    font-size: 90px;
    margin-bottom: 18px;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5));
}


.card-detail-name {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 12px;
}


.card-detail-rarity {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 18px;
}


.card-detail-desc {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.7;
    font-size: 14px;
}


.card-detail-stats {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-bottom: 25px;
}


.card-detail-stat {
    text-align: center;
}


.card-detail-stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
}


.card-detail-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ═══════════════════════════════════════════
   NOTIFICATIONS
   ═══════════════════════════════════════════ */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
    pointer-events: none;
}


.notification {
    background: rgba(26, 26, 46, 0.98);
    border: 3px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 18px 25px;
    min-width: 280px;
    animation: slideInRight 0.4s ease;
    pointer-events: auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}


.notification.success {
    border-color: var(--support);
}


.notification.error {
    border-color: var(--attack);
}


.notification.reward {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(255, 215, 0, 0.1));
}


.notification.legendary {
    border-color: var(--legendary);
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(251, 191, 36, 0.15), rgba(255, 100, 0, 0.1));
    animation: slideInRight 0.4s ease, fusionGlow 1s ease-in-out infinite;
    box-shadow: 0 5px 35px rgba(251, 191, 36, 0.4), 0 0 60px rgba(255, 100, 0, 0.2);
}


.notification.legendary .notification-title {
    background: linear-gradient(90deg, #ffd700, #ff8800, #ffd700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shineText 2s linear infinite;
    font-size: 18px;
    text-shadow: 0 0 20px rgba(255, 136, 0, 0.5);
}


@keyframes fusionGlow {
    0%, 100% { box-shadow: 0 5px 35px rgba(251, 191, 36, 0.4), 0 0 60px rgba(255, 100, 0, 0.2); }
    50% { box-shadow: 0 5px 45px rgba(251, 191, 36, 0.6), 0 0 80px rgba(255, 100, 0, 0.4); }
}


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


.notification-title {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 16px;
}


.notification-desc {
    font-size: 13px;
    color: var(--text-muted);
}


/* ═══════════════════════════════════════════
   RESPONSIVE STYLES
   ═══════════════════════════════════════════ */
@media (max-width: 1200px) {
    .battlefield-container {
        padding: 10px;
    }


    #battlefield {
        width: 100%;
        height: auto;
    }


    .powerups-bar {
        right: 10px;
    }


    .minimap-container {
        right: 10px;
        bottom: 100px;
    }


    #minimap {
        width: 160px;
        height: 120px;
    }
}


@media (max-width: 768px) {
    /* Deck Selection Mobile */
    .deck-select-container {
        flex-direction: column;
        padding: 10px;
    }


    .selected-deck-area {
        width: 100%;
        padding: 15px;
    }


    .selected-deck-slots {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }


    .deck-slot .slot-card-icon {
        font-size: 35px;
    }


    .deck-slot .slot-card-name {
        font-size: 9px;
    }


    .start-battle-btn {
        padding: 15px;
        font-size: 18px;
    }


    .deck-collection-area {
        flex: 1;
        min-height: 300px;
    }


    .deck-collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
        padding: 10px;
    }


    .collection-card-select .card-icon {
        font-size: 35px;
    }


    .collection-card-select .card-name {
        font-size: 10px;
    }


    /* Boss cinematic mobile */
    .cinematic-icon {
        font-size: 100px;
    }


    .cinematic-name {
        font-size: 36px;
        letter-spacing: 5px;
    }


    .cinematic-title {
        font-size: 18px;
    }


    .boss-health-container {
        width: 90%;
    }


    .boss-name {
        font-size: 18px;
    }


    .boss-health-bar {
        height: 24px;
    }


    .game-title {
        font-size: 26px;
    }


    .title-icon {
        font-size: 28px;
    }


    .stats-bar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding: 12px 15px;
    }


    .stat-item {
        padding: 6px 10px;
    }


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


    .stat-value {
        font-size: 18px;
    }


    .menu-row {
        flex-direction: column;
    }


    .menu-btn {
        padding: 12px 15px;
    }


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


    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }


    .game-card {
        max-width: 130px;
    }


    .card-icon {
        font-size: 38px;
    }


    .filter-tabs {
        justify-content: center;
    }


    .fusion-slots {
        flex-direction: column;
    }


    .fusion-plus {
        transform: rotate(90deg);
    }


    .spin-display {
        width: 170px;
        height: 240px;
    }


    .slot-card {
        font-size: 70px;
    }


    .spin-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 220px;
    }


    .spin-btn {
        width: 100%;
    }


    .achievement-card {
        flex-direction: column;
        text-align: center;
    }


    .quest-card {
        flex-direction: column;
        text-align: center;
    }


    .quest-reward {
        text-align: center;
    }


    .combat-hud {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 15px;
    }


    .health-bar {
        width: 160px;
        height: 24px;
    }


    .deck-bar {
        padding: 8px 10px;
        gap: 8px;
    }


    .deck-card {
        width: 60px;
        height: 75px;
    }


    .deck-card-icon {
        font-size: 26px;
    }


    .powerups-bar {
        position: fixed;
        right: 8px;
        top: auto;
        bottom: 180px;
        transform: none;
    }


    .powerup-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }


    .minimap-container {
        display: none;
    }


    .levels-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }


    .organ-card {
        width: 170px;
        padding: 22px 15px;
    }


    .organ-icon {
        font-size: 50px;
    }
}


@media (max-width: 480px) {
    .screen-header {
        padding: 10px 15px;
    }


    .screen-header h2 {
        font-size: 16px;
    }


    .back-btn {
        padding: 8px 12px;
        font-size: 12px;
    }


    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    .shop-grid {
        grid-template-columns: 1fr;
    }


    .achievements-grid {
        grid-template-columns: 1fr;
    }


    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    .result-content {
        padding: 35px 25px;
    }


    .result-title {
        font-size: 36px;
    }


    .result-rewards {
        flex-direction: column;
        gap: 15px;
    }


    .result-reward {
        font-size: 22px;
        justify-content: center;
    }


    .loading-title {
        font-size: 32px;
    }


    .loading-logo {
        font-size: 80px;
    }
}


/* ═══════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════ */
.hidden {
    display: none !important;
}


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


.text-gold {
    color: var(--gold);
}


.text-primary {
    color: var(--primary);
}


.mb-10 {
    margin-bottom: 10px;
}


.mb-20 {
    margin-bottom: 20px;
}


.mt-20 {
    margin-top: 20px;
}


/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}


::-webkit-scrollbar-track {
    background: var(--bg-dark);
}


::-webkit-scrollbar-thumb {
    background: var(--bg-panel);
    border-radius: 5px;
    border: 2px solid var(--bg-dark);
}


::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}


/* ═══════════════════════════════════════════
   COMBAT VFX STYLES
   ═══════════════════════════════════════════ */


/* Health bar damage flash */
.health-bar.damage-flash {
    animation: damageFlash 0.3s ease !important;
}


@keyframes damageFlash {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 68, 68, 0.8), inset 0 0 20px rgba(255, 0, 0, 0.5);
        border-color: #ff0000;
    }
}


/* Battlefield glow effect when power-up active */
#battlefield.power-active {
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
}


/* Combo display enhancements */
.combo-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    font-weight: 900;
    color: var(--gold);
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.9),
        0 0 40px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    opacity: 0;
    letter-spacing: 5px;
}


.combo-display.show {
    animation: comboShow 1.5s forwards;
}


@keyframes comboShow {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(-10deg);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3) rotate(5deg);
    }
    40% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5) rotate(0deg);
    }
}


/* Wave announcement animation */
@keyframes waveAnnounce {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* Deck card attack animation */
.deck-card.attacking {
    animation: deckCardAttack 0.2s ease;
}


@keyframes deckCardAttack {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px) scale(1.1); }
}


/* Power-up activation effect */
.powerup-btn.just-activated {
    animation: powerupActivate 0.5s ease;
}


@keyframes powerupActivate {
    0% { transform: scale(1); }
    25% { transform: scale(1.4) rotate(10deg); }
    50% { transform: scale(1.2) rotate(-10deg); }
    75% { transform: scale(1.3) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}


/* Victory particles effect */
@keyframes victoryParticle {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5);
    }
}


/* Boss warning flash */
@keyframes bossWarning {
    0%, 100% {
        background-color: rgba(0, 0, 0, 0.9);
    }
    50% {
        background-color: rgba(255, 0, 102, 0.3);
    }
}


/* Enhanced battlefield canvas */
#battlefield {
    max-width: 100%;
    max-height: 100%;
    border: 4px solid rgba(34, 197, 94, 0.4);
    border-radius: var(--border-radius);
    box-shadow:
        0 0 30px rgba(34, 197, 94, 0.2),
        inset 0 0 50px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}


#battlefield:hover {
    box-shadow:
        0 0 40px rgba(34, 197, 94, 0.3),
        inset 0 0 50px rgba(0, 0, 0, 0.3);
}


/* Enhanced health bar */
.health-bar {
    width: 220px;
    height: 30px;
    background: linear-gradient(180deg, #071a0f 0%, #030f07 100%);
    border: 3px solid var(--attack);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 0 15px rgba(255, 68, 68, 0.3),
        inset 0 2px 5px rgba(0, 0, 0, 0.5);
}


.health-fill {
    height: 100%;
    background: linear-gradient(90deg,
        #ff4444 0%,
        #ff6666 50%,
        #ff4444 100%
    );
    transition: width 0.2s ease;
    position: relative;
    overflow: hidden;
}


.health-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
}


/* Gold counter pulse on gain */
.combat-gold.gold-gain {
    animation: goldPulse 0.5s ease;
}


@keyframes goldPulse {
    0%, 100% { transform: scale(1); }
    50% {
        transform: scale(1.2);
        filter: brightness(1.5);
    }
}


/* Wave info glow */
.wave-info {
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}


/* ═══════════════════════════════════════════
   TOWER UPGRADE/SELL PANEL
   ═══════════════════════════════════════════ */


.tower-panel {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: rgba(16, 16, 36, 0.98);
    border: 3px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 0;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow:
        0 0 30px rgba(34, 197, 94, 0.4),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}


.tower-panel.active {
    opacity: 1;
    visibility: visible;
    animation: slideIn 0.3s ease;
}


.tower-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), transparent);
    border-bottom: 2px solid rgba(34, 197, 94, 0.3);
    position: relative;
}


.tower-panel-icon {
    font-size: 45px;
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.5));
}


.tower-panel-info {
    flex: 1;
}


.tower-panel-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 4px;
}


.tower-panel-level {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}


.tower-panel-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(255, 68, 68, 0.2);
    border: 2px solid var(--attack);
    border-radius: 50%;
    color: var(--attack);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}


.tower-panel-close:hover {
    background: var(--attack);
    color: white;
    transform: scale(1.1);
}


.tower-panel-stats {
    padding: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}


.tower-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


.tower-stat-row:last-child {
    border-bottom: none;
}


.tower-stat-row span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}


.tower-stat-row span:last-child {
    color: var(--text);
    font-weight: 600;
}


.stat-upgrade {
    color: var(--support) !important;
    font-weight: bold;
}


.tower-panel-actions {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.tower-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}


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


.tower-action-btn:hover:not(:disabled)::before {
    left: 100%;
}


.upgrade-btn {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(134, 239, 172, 0.3));
    border-color: var(--primary);
    color: var(--text);
}


.upgrade-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.5), rgba(134, 239, 172, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.3);
}


.upgrade-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--text-dim);
}


.sell-btn {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 170, 0, 0.2));
    border-color: var(--gold);
    color: var(--gold);
}


.sell-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 170, 0, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}


.action-icon {
    font-size: 20px;
}


.action-text {
    flex: 1;
    text-align: left;
    margin-left: 10px;
}


.action-cost {
    font-size: 13px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}


/* Tower level stars on render */
@keyframes levelUpEffect {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.3);
        filter: brightness(1.5);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}


/* ═══════════════════════════════════════════
   CARD SPECIAL ABILITY DISPLAY
   ═══════════════════════════════════════════ */
.game-card.has-special {
    position: relative;
}


.game-card.has-special::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--border-radius);
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}


@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}


.card-special {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    border: 1px solid;
    margin: 4px 0;
}


.special-icon {
    font-size: 14px;
}


.special-name {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.card-special-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px currentColor;
}


.spin-special-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 30px;
    animation: bounce 0.5s infinite;
    filter: drop-shadow(0 0 10px currentColor);
}


/* Card Detail Special Ability */
.card-detail-special {
    margin: 15px 0;
    padding: 15px;
    border-radius: var(--border-radius);
    border: 2px solid;
    background: rgba(0, 0, 0, 0.3);
}


.special-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}


.special-icon-large {
    font-size: 30px;
}


.special-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text);
}


.special-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}


.special-cooldown {
    color: var(--primary);
    font-size: 12px;
    font-weight: bold;
}


/* ═══════════════════════════════════════════
   FUSION VFX ANIMATIONS
   ═══════════════════════════════════════════ */
.fusion-area.fusion-animating {
    pointer-events: none;
}


.fusion-slot.fusion-dissolving {
    animation: fusionDissolve 0.8s ease forwards;
}


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


.fusion-result-slot.fusion-charging {
    animation: fusionCharge 1.2s ease infinite;
    box-shadow: 0 0 50px var(--secondary), 0 0 100px var(--secondary);
}


@keyframes fusionCharge {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px var(--secondary); }
    50% { transform: scale(1.1); box-shadow: 0 0 80px var(--secondary), 0 0 120px var(--primary); }
}


.fusion-result-slot.fusion-exploding {
    animation: fusionExplode 0.5s ease forwards;
}


@keyframes fusionExplode {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}


/* Fusion Particles */
.fusion-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    animation: fusionParticleMove 1s ease forwards;
    z-index: 9999;
}


@keyframes fusionParticleMove {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}


.fusion-vortex-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    pointer-events: none;
    animation: fusionVortexMove 1.2s ease forwards;
    z-index: 9999;
    box-shadow: 0 0 10px var(--secondary);
}


@keyframes fusionVortexMove {
    0% { opacity: 1; }
    100% {
        transform: translate(
            calc(var(--endX) - 50vw),
            calc(var(--endY) - 50vh)
        );
        opacity: 0;
    }
}


.fusion-shockwave {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 4px solid;
    pointer-events: none;
    animation: fusionShockwave 0.8s ease-out forwards;
    z-index: 9999;
    transform: translate(-50%, -50%);
}


@keyframes fusionShockwave {
    0% { width: 10px; height: 10px; opacity: 1; }
    100% { width: 400px; height: 400px; opacity: 0; }
}


.fusion-explosion-particle {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    pointer-events: none;
    animation: fusionExplosionParticle 1s ease-out forwards;
    z-index: 9999;
    transform: translate(-50%, -50%);
}


@keyframes fusionExplosionParticle {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); opacity: 0; }
}


/* Fusion Result Card */
.fusion-result-card {
    text-align: center;
    padding: 15px;
}


.fusion-result-icon {
    font-size: 50px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 20px currentColor);
}


.fusion-result-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}


.fusion-result-rarity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 8px;
}


.fusion-result-special {
    font-size: 12px;
    color: var(--secondary);
    padding: 4px 8px;
    background: rgba(134, 239, 172, 0.2);
    border-radius: 8px;
    animation: pulse 1s infinite;
}


/* ═══════════════════════════════════════════
   RESPONSIVE DESIGN - TABLET
   ═══════════════════════════════════════════ */
@media screen and (max-width: 1200px) {
    :root {
        --card-width: 160px;
        --card-height: 220px;
    }


    .loading-logo { font-size: 90px; }
    .loading-title { font-size: 42px; }
    .loading-bar-container { width: 300px; }


    .game-title { font-size: 32px; }
    .title-icon { font-size: 35px; }


    .stats-bar { gap: 15px; padding: 12px 20px; }
    .stat-icon { font-size: 24px; }
    .stat-value { font-size: 18px; }


    .menu-btn { padding: 12px 15px; }
    .btn-icon { font-size: 24px; }


    .organ-card { width: 180px; padding: 20px 15px; }
    .organ-icon { font-size: 55px; }
    .organ-name { font-size: 18px; }


    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }


    .game-card .card-icon { font-size: 45px; }
    .game-card .card-name { font-size: 11px; }


    #battlefield { width: 100%; height: auto; max-height: 500px; }


    .combat-hud { padding: 10px 15px; gap: 15px; }
    .deck-bar { padding: 8px 10px; }
    .deck-card { width: 55px; height: 70px; }


    .powerups-bar { right: 10px; gap: 8px; }
    .powerup-btn { width: 45px; height: 45px; font-size: 20px; }


    .minimap-container { width: 160px; height: 120px; }
    #minimap { width: 100%; height: 100%; }


    .tower-panel { width: 240px; left: 10px; }


    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }


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


    .fusion-slot { width: 110px; height: 145px; }
    .fusion-result-slot { width: 130px; height: 165px; }
    .fusion-plus { font-size: 28px; }
    .fusion-arrow { font-size: 40px; }
}


/* ═══════════════════════════════════════════
   RESPONSIVE DESIGN - MOBILE
   ═══════════════════════════════════════════ */
@media screen and (max-width: 768px) {
    :root {
        --card-width: 130px;
        --card-height: 180px;
        --border-radius: 10px;
        --border-radius-sm: 6px;
    }


    .loading-logo { font-size: 70px; }
    .loading-title { font-size: 32px; }
    .loading-subtitle { font-size: 16px; }
    .loading-bar-container { width: 250px; height: 10px; }


    .menu-container { max-width: 95%; padding: 10px; }
    .title-container { gap: 10px; }
    .game-title { font-size: 26px; letter-spacing: 1px; }
    .title-icon { font-size: 28px; }
    .game-version { font-size: 12px; }
    .game-tagline { font-size: 11px; }


    .stats-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 15px;
        justify-content: space-around;
    }
    .stat-item { padding: 6px 10px; }
    .stat-icon { font-size: 20px; }
    .stat-value { font-size: 16px; }
    .stat-label { font-size: 9px; }


    .menu-buttons { gap: 8px; }
    .menu-row { gap: 8px; flex-wrap: wrap; }
    .menu-btn {
        padding: 10px 12px;
        font-size: 12px;
        min-width: calc(50% - 4px);
    }
    .menu-btn.primary { padding: 15px; }
    .btn-icon { font-size: 22px; }
    .btn-text { font-size: 12px; }
    .btn-desc { font-size: 9px; }


    .daily-reward { padding: 10px 18px; }
    .daily-icon { font-size: 20px; }
    .daily-text { font-size: 12px; }


    .screen-header { padding: 12px 15px; }
    .screen-header h2 { font-size: 18px; }
    .back-btn { padding: 8px 15px; font-size: 12px; }


    .filter-tabs {
        padding: 10px 15px;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .filter-btn {
        padding: 8px 14px;
        font-size: 11px;
        white-space: nowrap;
    }


    .search-bar { padding: 10px 15px; }
    .search-bar input { padding: 10px 18px; font-size: 13px; }


    .organs-grid {
        gap: 15px;
        padding: 15px;
        flex-direction: column;
        align-items: center;
    }
    .organ-card {
        width: 100%;
        max-width: 300px;
        padding: 20px 15px;
    }
    .organ-icon { font-size: 50px; margin-bottom: 10px; }
    .organ-name { font-size: 18px; margin-bottom: 8px; }


    .levels-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
        padding: 15px;
    }
    .level-card { padding: 15px 10px; }
    .level-number { font-size: 24px; }
    .level-name { font-size: 10px; }
    .level-stars { font-size: 14px; }


    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
        padding: 15px;
    }


    .game-card {
        padding: 8px;
    }
    .game-card .card-header { margin-bottom: 4px; }
    .game-card .card-cost { width: 24px; height: 24px; font-size: 11px; }
    .game-card .card-type { font-size: 9px; padding: 2px 6px; }
    .game-card .card-icon { font-size: 38px; }
    .game-card .card-name { font-size: 10px; margin-bottom: 4px; }
    .game-card .card-stats { font-size: 10px; margin-bottom: 4px; }
    .game-card .card-stat { padding: 2px 6px; }
    .game-card .card-cost-bottom { font-size: 9px; padding: 4px; }
    .game-card .card-count { font-size: 10px; padding: 2px 8px; }
    .game-card .card-special { font-size: 8px; padding: 3px 5px; }
    .game-card .card-special-badge { width: 20px; height: 20px; font-size: 10px; }


    .game-card.mini { max-width: 70px; padding: 5px; }
    .game-card.mini .card-icon { font-size: 26px; }
    .game-card.mini .card-name { font-size: 8px; }
    .game-card.mini .card-cost-bottom { font-size: 7px; padding: 2px; }


    /* Combat Screen Mobile */
    #combat-screen {
        overflow: hidden;
    }


    .combat-hud {
        padding: 8px 10px;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hud-item { font-size: 12px; padding: 6px 10px; }
    .combat-level-name { font-size: 14px; }
    .health-bar { width: 120px; height: 16px; }
    .health-text { font-size: 10px; }
    .wave-info { font-size: 12px; }
    .combat-gold { font-size: 14px; }


    .battlefield-container {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px;
        overflow: hidden;
    }


    #battlefield {
        width: 100%;
        height: auto;
        max-height: calc(100vh - 280px);
        object-fit: contain;
    }


    .deck-bar {
        padding: 6px 8px;
        gap: 6px;
        justify-content: center;
        flex-wrap: wrap;
    }
    .deck-card {
        width: 48px;
        height: 62px;
    }
    .deck-card-icon { font-size: 20px; }
    .deck-card-cost {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: 2px; left: 2px;
    }
    .deck-card-cost-text { font-size: 8px; }


    .powerups-bar {
        position: fixed;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        gap: 5px;
        padding: 5px;
    }
    .powerup-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    .powerup-cooldown { font-size: 8px; }


    .minimap-container {
        width: 100px;
        height: 75px;
        bottom: 85px;
        right: 5px;
    }


    .pause-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }


    .tower-panel {
        width: 95%;
        max-width: 280px;
        left: 50%;
        transform: translate(-50%, -50%);
        top: 50%;
        padding: 15px;
        font-size: 13px;
    }
    .tower-panel-icon { font-size: 36px; }
    .tower-panel-name { font-size: 16px; }
    .tower-panel-level { font-size: 11px; }
    .tower-stat-row { padding: 8px 0; font-size: 12px; }
    .tower-action-btn { padding: 10px; font-size: 13px; }
    .action-icon { font-size: 16px; }
    .action-cost { font-size: 11px; padding: 3px 8px; }


    /* Spin Screen Mobile */
    .spin-count { font-size: 16px; padding: 8px 15px; }
    .spin-display { width: 180px; height: 240px; }
    .slot-card { font-size: 70px; }
    .spin-buttons { gap: 15px; padding: 15px; flex-wrap: wrap; justify-content: center; }
    .spin-btn { padding: 14px 30px; font-size: 16px; }
    .spin-result { gap: 8px; }
    .rarity-rates { padding: 15px; }
    .rates-grid { gap: 5px; }
    .rate { padding: 4px 10px; font-size: 9px; }


    /* Fusion Screen Mobile */
    .fusion-info { padding: 12px 15px; font-size: 13px; }
    .fusion-area { padding: 20px 10px; }
    .fusion-slots { gap: 8px; flex-wrap: wrap; justify-content: center; }
    .fusion-slot { width: 90px; height: 120px; }
    .fusion-result-slot { width: 100px; height: 130px; }
    .slot-placeholder { font-size: 35px; }
    .fusion-plus { font-size: 24px; }
    .fusion-arrow { font-size: 35px; margin: 15px 0; }
    .fuse-btn { padding: 14px 40px; font-size: 18px; }
    .fusion-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 8px;
    }


    /* Shop Screen Mobile */
    .shop-currency { gap: 15px; font-size: 14px; }
    .shop-currency span { padding: 6px 12px; }
    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
        padding: 15px;
    }
    .shop-item { padding: 18px 15px; }
    .shop-item-icon { font-size: 40px; margin-bottom: 10px; }
    .shop-item-name { font-size: 15px; }
    .shop-item-desc { font-size: 11px; }
    .shop-item-price { font-size: 15px; }
    .shop-buy-btn { padding: 10px; font-size: 12px; }


    /* Achievements Mobile */
    .achievements-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    .achievement-card { padding: 15px; gap: 12px; }
    .achievement-icon { font-size: 38px; }
    .achievement-name { font-size: 14px; }
    .achievement-desc { font-size: 11px; }


    /* Quests Mobile */
    .quests-container { padding: 15px; gap: 12px; }
    .quest-card { padding: 15px; gap: 12px; flex-wrap: wrap; }
    .quest-icon { font-size: 38px; }
    .quest-title { font-size: 15px; }
    .quest-desc { font-size: 12px; }
    .quest-reward { width: 100%; text-align: center; margin-top: 10px; }
    .quest-claim-btn { width: 100%; margin-top: 10px; }


    /* Stats Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
    }
    .stat-card { padding: 18px 12px; }
    .stat-card-icon { font-size: 32px; }
    .stat-card-value { font-size: 22px; }
    .stat-card-label { font-size: 10px; }


    /* Modals Mobile */
    .modal-content {
        width: 95%;
        max-width: 350px;
        padding: 20px;
        max-height: 85vh;
        overflow-y: auto;
    }
    .modal-close-btn { padding: 12px 25px; font-size: 14px; }


    .card-detail-icon { font-size: 60px; }
    .card-detail-name { font-size: 20px; }
    .card-detail-rarity { font-size: 11px; padding: 5px 12px; }
    .card-detail-desc { font-size: 13px; }
    .card-detail-stats { gap: 15px; }
    .card-detail-stat-value { font-size: 24px; }
    .card-detail-stat-label { font-size: 10px; }


    /* Notifications Mobile */
    .notification {
        max-width: calc(100vw - 30px);
        right: 15px;
        padding: 12px 15px;
    }
    .notification-title { font-size: 13px; }
    .notification-message { font-size: 11px; }
}


/* ═══════════════════════════════════════════
   RESPONSIVE DESIGN - SMALL MOBILE
   ═══════════════════════════════════════════ */
@media screen and (max-width: 480px) {
    :root {
        --card-width: 110px;
        --card-height: 155px;
    }


    .loading-logo { font-size: 55px; }
    .loading-title { font-size: 26px; }
    .loading-subtitle { font-size: 14px; margin-bottom: 25px; }
    .loading-bar-container { width: 200px; }


    .game-title { font-size: 22px; }
    .title-icon { font-size: 24px; }


    .menu-btn {
        min-width: 100%;
        padding: 12px;
    }
    .menu-row { flex-direction: column; }


    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    }


    .game-card .card-icon { font-size: 32px; }
    .game-card .card-stats { display: none; }
    .game-card .card-special { display: none; }


    .fusion-slots { flex-direction: column; gap: 10px; }
    .fusion-plus { display: none; }


    .deck-card { width: 42px; height: 55px; }
    .deck-card-icon { font-size: 18px; }
    .deck-card-cost-text { display: none; }


    .powerup-btn { width: 32px; height: 32px; font-size: 14px; }


    .minimap-container { display: none; }


    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ═══════════════════════════════════════════
   LANDSCAPE MODE FIXES
   ═══════════════════════════════════════════ */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .loading-logo { font-size: 50px; }
    .loading-title { font-size: 28px; }
    .loading-bar-container { width: 200px; margin: 10px auto; }


    .menu-container { max-width: 600px; }
    .menu-header { margin-bottom: 15px; }
    .stats-bar { margin-bottom: 15px; }
    .menu-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .menu-row { display: contents; }
    .menu-btn { min-width: auto; }
    .menu-footer { margin-top: 15px; }


    #battlefield { max-height: calc(100vh - 150px); }


    .combat-hud { padding: 5px 10px; }
    .deck-bar { position: fixed; bottom: 0; left: 0; right: 60px; }
    .powerups-bar {
        flex-direction: row;
        right: 0;
        bottom: 0;
        top: auto;
        transform: none;
        padding: 5px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   FORGE SCREEN - CRAFT DES RINGS
   ═══════════════════════════════════════════════════════════════════════════ */
#forge-screen {
    background: linear-gradient(180deg, #1a0a0a 0%, #2d1a1a 50%, #1a0a0a 100%);
    overflow: hidden;
}
#forge-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 70%, rgba(255,68,0,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(138,43,226,0.06) 0%, transparent 50%);
    animation: forgeAmbient 8s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes forgeAmbient {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}


.forge-header {
    background: linear-gradient(90deg, rgba(255, 68, 0, 0.15), rgba(26, 26, 46, 0.95), rgba(255, 68, 0, 0.15));
    border-bottom: 1px solid rgba(255,68,0,0.2);
    position: relative;
    z-index: 2;
}


.orbs-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(138, 43, 226, 0.3);
    border-radius: 25px;
    border: 2px solid rgba(138, 43, 226, 0.6);
}


.orb-icon { font-size: 24px; }
.orb-count {
    font-size: 20px;
    font-weight: bold;
    color: #b388ff;
}


.forge-container {
    display: flex;
    gap: 30px;
    padding: 30px;
    flex: 1;
    overflow: hidden;
}


.forge-visual {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}


.forge-fire {
    width: 200px;
    height: 150px;
    position: relative;
    margin-bottom: 20px;
}


.flame {
    position: absolute;
    bottom: 0;
    border-radius: 50% 50% 20% 20%;
    animation: flicker 0.5s infinite alternate;
}


.flame-1 {
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 100px;
    background: linear-gradient(to top, #ff4400, #ff8800, #ffff00);
    animation-delay: 0s;
}


.flame-2 {
    left: 30%;
    width: 40px;
    height: 70px;
    background: linear-gradient(to top, #ff6600, #ffaa00, #ffff88);
    animation-delay: 0.1s;
}


.flame-3 {
    right: 30%;
    width: 40px;
    height: 70px;
    background: linear-gradient(to top, #ff6600, #ffaa00, #ffff88);
    animation-delay: 0.2s;
}


@keyframes flicker {
    0% { transform: scaleY(1) scaleX(1); opacity: 0.9; }
    100% { transform: scaleY(1.1) scaleX(0.95); opacity: 1; }
}


.forge-anvil {
    width: 250px;
    height: 80px;
    background: linear-gradient(180deg, #555, #333, #222);
    border-radius: 10px 10px 5px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}


.anvil-slot {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #071a0f, #0a0a15);
    border: 3px dashed rgba(138, 43, 226, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}


.anvil-slot.active {
    border-color: #b388ff;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.6);
    animation: pulse 1s infinite;
}


.anvil-slot .slot-placeholder {
    font-size: 40px;
    opacity: 0.3;
}


.forge-result {
    margin-top: 30px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.forged-ring {
    animation: ringForged 1s ease;
}


@keyframes ringForged {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}


.forge-rings-list {
    flex: 1;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 20px;
    padding: 20px;
    overflow-y: auto;
}


.forge-rings-list h3 {
    margin-bottom: 15px;
    color: var(--gold);
}


.forge-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}


.forge-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}


.forge-tab:hover, .forge-tab.active {
    background: linear-gradient(135deg, #ff4400, #ff8800);
}


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


.forge-ring-item {
    background: linear-gradient(145deg, rgba(40, 40, 70, 0.9), rgba(20, 20, 40, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}


.forge-ring-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}


.forge-ring-item.selected {
    border-color: #b388ff;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
}


.forge-ring-item.owned {
    opacity: 0.5;
    pointer-events: none;
}


.forge-ring-icon { font-size: 32px; margin-bottom: 8px; }
.forge-ring-name { font-size: 12px; margin-bottom: 5px; }
.forge-ring-cost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 14px;
    color: #b388ff;
}


.forge-craft-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 60px;
    background: linear-gradient(135deg, #ff4400, #ff8800);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(255, 68, 0, 0.4);
}


.forge-craft-btn:hover:not(:disabled) {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 15px 50px rgba(255, 68, 0, 0.6);
}


.forge-craft-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Forge Crafting Animation */
.forge-crafting .forge-fire .flame {
    animation: forgeFlare 0.2s infinite alternate;
}


@keyframes forgeFlare {
    0% { transform: scaleY(1) scaleX(1); filter: brightness(1); }
    100% { transform: scaleY(1.5) scaleX(1.3); filter: brightness(1.5); }
}


.forge-sparks {
    position: absolute;
    pointer-events: none;
}


.forge-spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffff00;
    border-radius: 50%;
    animation: sparkFly 0.8s ease-out forwards;
}


@keyframes sparkFly {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   RINGS SCREEN - EQUIPEMENT
   ═══════════════════════════════════════════════════════════════════════════ */
#rings-screen {
    background: linear-gradient(135deg, #030f07 0%, #0d2b18 50%, #030f07 100%);
}


.rings-header {
    background: linear-gradient(90deg, rgba(138, 43, 226, 0.2), rgba(26, 26, 46, 0.95), rgba(138, 43, 226, 0.2));
}


.rings-container {
    display: flex;
    gap: 30px;
    padding: 30px;
    flex: 1;
    overflow: hidden;
}


.equipped-rings {
    flex: 0 0 350px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid rgba(138, 43, 226, 0.3);
}


.equipped-rings h3 {
    margin-bottom: 20px;
    color: #b388ff;
    text-align: center;
}


.equipped-slots {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}


.ring-slot {
    width: 90px;
    height: 90px;
    background: linear-gradient(145deg, rgba(40, 40, 70, 0.9), rgba(20, 20, 40, 0.9));
    border: 3px dashed rgba(138, 43, 226, 0.4);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}


.ring-slot:hover {
    border-color: #b388ff;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
}


.ring-slot.filled {
    border-style: solid;
    border-color: #b388ff;
    background: linear-gradient(145deg, rgba(60, 40, 100, 0.9), rgba(40, 20, 60, 0.9));
}


.ring-slot .slot-number {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #b388ff;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}


.ring-slot .slot-placeholder {
    font-size: 30px;
    opacity: 0.3;
}


.ring-slot .equipped-ring-icon {
    font-size: 40px;
}


.ring-slot .equipped-ring-name {
    font-size: 10px;
    margin-top: 5px;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.total-bonuses {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 15px;
}


.total-bonuses h4 {
    margin-bottom: 10px;
    color: var(--gold);
    font-size: 14px;
}


.bonus-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.bonus-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}


.bonus-value {
    color: var(--support);
    font-weight: bold;
}


.owned-rings {
    flex: 1;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 20px;
    padding: 25px;
    overflow-y: auto;
}


.owned-rings h3 {
    margin-bottom: 15px;
    color: var(--primary);
}


.rings-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}


.ring-filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 15px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}


.ring-filter-btn:hover, .ring-filter-btn.active {
    background: linear-gradient(135deg, #b388ff, #8844ff);
}


.owned-rings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}


.owned-ring-card {
    background: linear-gradient(145deg, rgba(40, 40, 70, 0.9), rgba(20, 20, 40, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}


.owned-ring-card:hover {
    transform: translateY(-5px);
    border-color: #b388ff;
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.3);
}


.owned-ring-card.equipped {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}


.owned-ring-card.tier-1 { border-color: rgba(176, 176, 176, 0.5); }
.owned-ring-card.tier-2 { border-color: rgba(59, 130, 246, 0.5); }
.owned-ring-card.tier-3 { border-color: rgba(168, 85, 247, 0.5); }
.owned-ring-card.tier-4 { border-color: rgba(251, 191, 36, 0.5); }


.ring-card-icon { font-size: 36px; margin-bottom: 8px; }
.ring-card-name { font-size: 13px; font-weight: bold; margin-bottom: 5px; }
.ring-card-desc { font-size: 11px; color: var(--text-muted); }


.ring-card-tier {
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}


.ring-card-tier.tier-1 { background: rgba(176, 176, 176, 0.3); color: #b0b0b0; }
.ring-card-tier.tier-2 { background: rgba(59, 130, 246, 0.3); color: #3b82f6; }
.ring-card-tier.tier-3 { background: rgba(168, 85, 247, 0.3); color: #a855f7; }
.ring-card-tier.tier-4 { background: rgba(251, 191, 36, 0.3); color: #fbbf24; }


.no-rings-message {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}


.no-rings-message .empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}


/* NEW Badge for menu buttons */
.new-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff4444, #ff0066);
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
    animation: newBadgePulse 2s infinite;
}


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


.forge-btn, .rings-btn, .orbs-btn, .reactions-btn {
    position: relative;
}


/* ═══════════════════════════════════════════
   ORBS STAT IN MENU
   ═══════════════════════════════════════════ */
.orbs-stat {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(75, 0, 130, 0.3));
    border: 1px solid rgba(138, 43, 226, 0.5);
}


.orbs-icon {
    animation: orbFloat 2s ease-in-out infinite;
}


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


/* ═══════════════════════════════════════════
   NEW FORGE SCREEN - CAULDRON STYLE
   ═══════════════════════════════════════════ */
.forge-container-new {
    display: grid;
    grid-template-columns: 1fr 300px 250px;
    gap: 20px;
    padding: 20px;
    height: calc(100% - 80px);
}


.forge-crafting-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}


/* Cauldron */
.forge-cauldron {
    position: relative;
    width: 250px;
    height: 280px;
}


.cauldron-fire {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 80px;
}


.cauldron-flame {
    position: absolute;
    bottom: 0;
    border-radius: 50% 50% 20% 20%;
    animation: cauldronFlame 0.5s ease-in-out infinite alternate;
}


.cf1 {
    left: 30%;
    width: 40px;
    height: 60px;
    background: linear-gradient(to top, #ff4400, #ff8800, #ffcc00);
    animation-delay: 0s;
}


.cf2 {
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 70px;
    background: linear-gradient(to top, #ff2200, #ff6600, #ffaa00);
    animation-delay: 0.1s;
}


.cf3 {
    right: 30%;
    width: 35px;
    height: 55px;
    background: linear-gradient(to top, #ff4400, #ff8800, #ffcc00);
    animation-delay: 0.2s;
}


@keyframes cauldronFlame {
    0% { transform: scaleY(1) scaleX(1); }
    100% { transform: scaleY(1.2) scaleX(0.9); }
}


.cauldron-pot {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 150px;
    background: linear-gradient(180deg, #333, #1a1a1a, #111);
    border-radius: 20px 20px 50% 50%;
    border: 4px solid #555;
    overflow: hidden;
    box-shadow: inset 0 -20px 40px rgba(0, 0, 0, 0.5), 0 5px 25px rgba(0,0,0,0.6);
    transition: all 0.5s ease;
}


.cauldron-pot.active {
    border-color: #ff6600;
    box-shadow: inset 0 -20px 40px rgba(0, 0, 0, 0.5), 0 5px 25px rgba(255,100,0,0.3), 0 0 40px rgba(255,68,0,0.15);
}


.cauldron-liquid {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 0;
    background: linear-gradient(180deg, #8b5cf6, #6366f1, #4f46e5);
    border-radius: 0 0 50% 50%;
    transition: height 0.5s ease;
}


.cauldron-liquid.melting {
    animation: liquidBubble 0.3s ease-in-out infinite;
}


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


.cauldron-orbs {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    max-width: 140px;
}


.cauldron-orb {
    font-size: 24px;
    animation: orbBob 1s ease-in-out infinite;
}


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


.cauldron-bubbles {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}


.bubble {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: bubbleRise 1s ease-out forwards;
}


@keyframes bubbleRise {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-80px) scale(0.5); opacity: 0; }
}


.cauldron-label {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 14px;
}


/* Melt Button */
.forge-melt-btn {
    padding: 16px 45px;
    font-size: 18px;
    background: linear-gradient(135deg, #ff4400, #ff8800);
    border: 2px solid rgba(255,136,0,0.4);
    border-radius: 12px;
    color: white;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}


.forge-melt-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}


.forge-melt-btn:hover:not(:disabled)::before {
    transform: translateX(100%);
}


.forge-melt-btn:hover:not(:disabled) {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 100, 0, 0.5), 0 0 60px rgba(255,68,0,0.2);
    border-color: #ffaa00;
}


.forge-melt-btn:active:not(:disabled) {
    transform: scale(0.97);
    transition-duration: 0.1s;
}


.forge-melt-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}


/* Forge phase transitions */
@keyframes forgePhaseIn {
    0% { opacity: 0; transform: scale(0.8) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes forgePhaseOut {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.8) translateY(-20px); }
}
.forge-phase-enter {
    animation: forgePhaseIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.forge-phase-exit {
    animation: forgePhaseOut 0.3s ease forwards;
}


/* Anvil Area */
.forge-anvil-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}


.anvil-base {
    width: 200px;
    height: 80px;
    background: linear-gradient(180deg, #555, #333);
    border-radius: 10px 10px 5px 5px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}


.molten-metal {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 40px;
    background: linear-gradient(180deg, #ff8800, #ff4400, #cc2200);
    border-radius: 20px;
    animation: moltenGlow 1s ease-in-out infinite;
}


@keyframes moltenGlow {
    0%, 100% { box-shadow: 0 0 20px #ff8800; }
    50% { box-shadow: 0 0 40px #ffaa00; }
}


.hammer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}


.hammer {
    font-size: 60px;
    cursor: pointer;
    transition: transform 0.1s ease;
    user-select: none;
}


.hammer:hover {
    transform: scale(1.1);
}


.hammer.striking {
    animation: hammerStrike 0.2s ease-out;
}


@keyframes hammerStrike {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(30px) rotate(-20deg); }
    100% { transform: translateY(0) rotate(0deg); }
}


.hammer-progress {
    width: 150px;
    height: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
}


.hammer-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff4400, #ff8800, #ffcc00);
    transition: width 0.2s ease;
}


.hammer-count {
    color: var(--text-muted);
    font-size: 14px;
}


/* Ring Result */
.forge-ring-result {
    position: relative;
    padding: 30px;
    text-align: center;
}


.result-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.6), transparent);
    border-radius: 50%;
    animation: resultGlow 1s ease-in-out infinite;
}


@keyframes resultGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}


.result-ring {
    font-size: 80px;
    position: relative;
    z-index: 1;
    animation: resultReveal 0.5s ease-out;
}


@keyframes resultReveal {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}


.collect-ring-btn {
    margin-top: 20px;
    padding: 12px 30px;
    font-size: 16px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    z-index: 1;
}


/* Orbs Selection */
.forge-orbs-selection {
    background: var(--bg-panel);
    border-radius: 15px;
    padding: 15px;
    overflow-y: auto;
}


.forge-orbs-selection h3 {
    margin-bottom: 10px;
    text-align: center;
}


.orbs-info {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 10px;
}


.forge-orbs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}


.forge-orb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: rgba(20,20,40,0.8);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}


.forge-orb-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.08), transparent 70%);
    pointer-events: none;
}


.forge-orb-item:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    border-color: rgba(138,43,226,0.5);
}


.forge-orb-item.selected {
    border-color: #8b5cf6;
    background: rgba(138,43,226,0.25);
    box-shadow: 0 0 20px rgba(138,43,226,0.3), inset 0 0 15px rgba(138,43,226,0.1);
    transform: scale(1.05);
}


.forge-orb-item .orb-emoji {
    font-size: 30px;
}


.forge-orb-item .orb-count {
    font-size: 11px;
    color: var(--text-muted);
}


.selected-orbs-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 8px;
    font-size: 13px;
}


/* Recipes */
.forge-recipes {
    background: var(--bg-panel);
    border-radius: 15px;
    padding: 15px;
    overflow-y: auto;
}


.recipes-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.recipe-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 8px;
    font-size: 12px;
}


.recipe-ring {
    font-size: 24px;
}


.recipe-cost {
    color: var(--text-muted);
}


/* ═══════════════════════════════════════════
   ORBS COLLECTION SCREEN
   ═══════════════════════════════════════════ */
.orbs-header {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(75, 0, 130, 0.2));
}


.total-orbs-value {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--secondary);
}


.orbs-container {
    padding: 20px;
}


.orbs-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}


.orbs-filter {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--bg-panel);
    border-radius: 20px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}


.orbs-filter:hover, .orbs-filter.active {
    background: var(--secondary);
    border-color: var(--secondary);
}


.orbs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}


.orb-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 15px;
    border: 2px solid;
    transition: all 0.3s ease;
}


.orb-card:hover {
    transform: translateY(-5px);
}


.orb-card.COMMON { border-color: var(--common); }
.orb-card.UNCOMMON { border-color: var(--uncommon); }
.orb-card.RARE { border-color: var(--rare); }
.orb-card.EPIC { border-color: var(--epic); }
.orb-card.LEGENDARY { border-color: var(--legendary); }
.orb-card.MYTHIC { border-color: var(--mythic); }


.orb-emoji {
    font-size: 40px;
    margin-bottom: 10px;
}


.orb-name {
    font-size: 11px;
    text-align: center;
    color: var(--text);
    margin-bottom: 5px;
}


.orb-rarity {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    margin-bottom: 5px;
}


.orb-owned-count {
    font-size: 14px;
    font-weight: bold;
}


.orbs-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
}


.orb-stat-item {
    text-align: center;
}


.orb-stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}


.orb-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary);
}


/* ═══════════════════════════════════════════
   CHEMICAL REACTIONS SCREEN
   ═══════════════════════════════════════════ */
.reactions-header {
    background: linear-gradient(135deg, rgba(0, 200, 150, 0.3), rgba(0, 100, 100, 0.2));
}


.reactions-info {
    text-align: center;
    padding: 15px;
    background: rgba(0, 200, 150, 0.1);
    border-radius: 10px;
    margin: 10px 20px;
}


.reactions-info p {
    margin: 5px 0;
    font-size: 14px;
}


.reactions-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 20px;
    justify-content: center;
}


.reactions-filter {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--bg-panel);
    border-radius: 20px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}


.reactions-filter:hover, .reactions-filter.active {
    background: #00c896;
    border-color: #00c896;
}


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


.reaction-card {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 15px;
    border: 2px solid rgba(0, 200, 150, 0.3);
    transition: all 0.3s ease;
}


.reaction-card:hover {
    transform: translateY(-3px);
    border-color: #00c896;
    box-shadow: 0 5px 20px rgba(0, 200, 150, 0.3);
}


.reaction-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}


.reaction-icon {
    font-size: 30px;
}


.reaction-name-text {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary);
}


.reaction-cards-needed {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}


.reaction-card-name {
    padding: 5px 10px;
    background: var(--bg-panel);
    border-radius: 8px;
    font-size: 12px;
}


.reaction-plus {
    color: var(--text-muted);
}


.reaction-effect {
    font-size: 14px;
    color: #00c896;
    font-weight: bold;
}


.reactions-discovered {
    padding: 20px;
}


.reactions-discovered h3 {
    margin-bottom: 15px;
    text-align: center;
}


.discovered-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}


.discovered-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #00c896, #00a080);
    border-radius: 20px;
    font-size: 13px;
}


/* ═══════════════════════════════════════════
   COMBAT RINGS AREA
   ═══════════════════════════════════════════ */
.rings-combat-container {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 10px;
    border: 2px solid var(--secondary);
    z-index: 900;
}


.rings-combat-title {
    font-size: 12px;
    text-align: center;
    margin-bottom: 8px;
    color: var(--secondary);
}


.rings-combat-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.combat-ring-slot {
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}


.combat-ring-slot:hover {
    transform: scale(1.1);
    border-color: var(--secondary);
}


.combat-ring-slot.on-cooldown {
    opacity: 0.5;
}


.combat-ring-slot .ring-cooldown {
    position: absolute;
    bottom: -5px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 5px;
    border-radius: 5px;
}


/* Ring Totem Animation */
.ring-totem-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}


.totem-container {
    position: relative;
    text-align: center;
}


.totem-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.8), transparent);
    border-radius: 50%;
    animation: totemGlow 1s ease-in-out infinite;
}


@keyframes totemGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}


.totem-ring {
    font-size: 150px;
    position: relative;
    z-index: 1;
    animation: totemRise 1s ease-out;
}


@keyframes totemRise {
    0% { transform: translateY(200px) scale(0.5); opacity: 0; }
    50% { transform: translateY(-50px) scale(1.2); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}


.totem-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}


.totem-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--secondary);
    border-radius: 50%;
    animation: totemParticle 1.5s ease-out forwards;
}


@keyframes totemParticle {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}


.totem-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary);
    margin-top: 20px;
    animation: totemTextPulse 0.5s ease-in-out infinite;
}


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


/* Chemical Reaction Cutscene */
.reaction-cutscene {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.reaction-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 50, 50, 0.9));
}


.reaction-cards {
    display: flex;
    gap: 30px;
    position: relative;
    z-index: 1;
    animation: reactionCardsSlide 0.5s ease-out;
}


@keyframes reactionCardsSlide {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}


.reaction-card-display {
    width: 100px;
    height: 140px;
    background: var(--bg-card);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px solid;
}


.reaction-effect-display {
    font-size: 100px;
    margin: 20px 0;
    position: relative;
    z-index: 1;
    animation: reactionEffectPop 0.5s ease-out 0.5s both;
}


@keyframes reactionEffectPop {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}


.reaction-name-display {
    font-size: 32px;
    font-weight: bold;
    color: #00c896;
    position: relative;
    z-index: 1;
    animation: reactionNameReveal 0.5s ease-out 0.8s both;
}


@keyframes reactionNameReveal {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}


/* ═══════════════════════════════════════════
   TOWER ELECTRICITY ARCS
   ═══════════════════════════════════════════ */
.electricity-arc {
    position: absolute;
    pointer-events: none;
    z-index: 50;
}


/* Tower Heat Glow */
.tower-heated {
    animation: towerHeat 0.3s ease-in-out infinite;
}


@keyframes towerHeat {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3) hue-rotate(10deg); }
}


/* Hypercharge Aura (Brawl Stars style) */
.hypercharge-aura {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 200, 0, 0.4), transparent);
    animation: hyperchargeAura 0.5s ease-in-out infinite;
}


@keyframes hyperchargeAura {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.5); opacity: 0.4; }
    100% { transform: scale(2); opacity: 0; }
}


/* Improved VFX Styles */
.vfx-explosion {
    position: absolute;
    border-radius: 50%;
    animation: vfxExplosion 0.5s ease-out forwards;
}


@keyframes vfxExplosion {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}


.vfx-shockwave {
    position: absolute;
    border: 3px solid;
    border-radius: 50%;
    animation: vfxShockwave 0.5s ease-out forwards;
}


@keyframes vfxShockwave {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(5); opacity: 0; }
}


/* Spark fly animation for forge */
@keyframes sparkFly {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}


.forge-spark {
    animation: sparkFly 0.5s ease-out forwards;
}


/* Not owned orb card */
.orb-card.not-owned {
    opacity: 0.4;
    filter: grayscale(1);
}


/* Reaction card discovered */
.reaction-card.discovered {
    border-color: #00c896;
    box-shadow: 0 0 15px rgba(0, 200, 150, 0.3);
}


/* Responsive for new screens */
@media (max-width: 768px) {
    .forge-container-new {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }


    .rings-combat-container {
        left: 5px;
        top: auto;
        bottom: 150px;
        transform: none;
    }


    .combat-ring-slot {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }


    .reactions-grid {
        grid-template-columns: 1fr;
    }


    .orbs-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   ECRAN ABILITIES
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════
   ABILITIES SCREEN - ELECTRIC THEME
   ═══════════════════════════════════════════ */
#abilities-screen {
    padding: 20px;
    background: linear-gradient(160deg, #0a0a28, #0d1535, #0a0a28);
}
#abilities-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255, 200, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
    pointer-events: none;
    animation: abilitiesBgPulse 6s ease-in-out infinite alternate;
}
@keyframes abilitiesBgPulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}


.abilities-info {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}


.abilities-info p {
    margin: 5px 0;
    color: var(--text);
}


.abilities-hint {
    color: var(--text-muted);
    font-size: 14px;
}


.ability-slots-container {
    background: rgba(10, 15, 40, 0.8);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 200, 0, 0.15);
    position: relative;
    z-index: 1;
}


.ability-slots-container h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
}


.ability-slots {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}


.ability-slot {
    width: 90px;
    height: 100px;
    background: rgba(20, 25, 50, 0.9);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 200, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}


.ability-slot.filled {
    border: 2px solid rgba(34, 197, 94, 0.6);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(134, 239, 172, 0.12));
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
    animation: slotFilledPulse 2s ease-in-out infinite;
}
@keyframes slotFilledPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(34, 197, 94, 0.15); }
    50% { box-shadow: 0 0 25px rgba(34, 197, 94, 0.3); }
}


.ability-slot:hover {
    transform: scale(1.08);
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(255, 200, 0, 0.2);
}


.slot-icon {
    font-size: 36px;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 6px currentColor);
}


.slot-name {
    font-size: 10px;
    text-align: center;
    color: var(--text);
    letter-spacing: 0.5px;
}


.slot-empty {
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
}


.abilities-grid-container {
    position: relative;
    z-index: 1;
}


.abilities-grid-container h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--secondary);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
}


.abilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}


.ability-card {
    background: linear-gradient(145deg, rgba(15, 20, 45, 0.95), rgba(25, 30, 60, 0.95));
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.05);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}


.ability-card-glow {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 14px;
    pointer-events: none;
    transition: background 0.3s ease;
}


.ability-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(255, 200, 0, 0.06) 10%, transparent 20%);
    animation: abilityCardSpin 8s linear infinite;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.ability-card:hover::after { opacity: 1; }
@keyframes abilityCardSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.ability-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(255, 200, 0, 0.4);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 200, 0, 0.1);
}


.ability-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.3), inset 0 0 20px rgba(34, 197, 94, 0.05);
    background: linear-gradient(145deg, rgba(0, 30, 60, 0.95), rgba(10, 40, 70, 0.95));
}


.ability-card.disabled {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.5);
}


.ability-icon {
    font-size: 46px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 8px currentColor);
    transition: transform 0.3s;
}
.ability-card:hover .ability-icon {
    transform: scale(1.15) rotate(-5deg);
}


.ability-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}


.ability-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    min-height: 28px;
    line-height: 1.3;
}


.ability-stats {
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 10px;
}


.ability-stats span {
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}


.ability-select-indicator {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 200, 0, 0.7);
    padding: 5px 12px;
    background: rgba(255, 200, 0, 0.08);
    border-radius: 8px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}


.ability-card.selected .ability-select-indicator {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}


/* ═══════════════════════════════════════════════════════════════════════════
   ECRAN SKINS - RAINBOW THEME
   ═══════════════════════════════════════════════════════════════════════════ */


#skins-screen {
    padding: 20px;
    background: linear-gradient(160deg, #0d0d25, #15102e, #0d0d25);
}
#skins-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 75%, rgba(255, 0, 255, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 25%, rgba(0, 255, 200, 0.04) 0%, transparent 50%);
    animation: skinsBgShift 10s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes skinsBgShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(60deg); }
}


.skins-info {
    text-align: center;
    margin-bottom: 24px;
    font-size: 16px;
    position: relative;
    z-index: 1;
}


.skins-info span {
    font-weight: bold;
    color: var(--primary);
}


.skins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    position: relative;
    z-index: 1;
}


.skin-card {
    background: linear-gradient(145deg, rgba(18, 18, 45, 0.95), rgba(28, 25, 55, 0.95));
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}


.skin-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    transition: left 0.6s ease;
}
.skin-card:hover::before { left: 100%; }


.skin-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}


.skin-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.3), 0 8px 30px rgba(0, 0, 0, 0.3);
    background: linear-gradient(145deg, rgba(0, 25, 50, 0.95), rgba(10, 35, 60, 0.95));
}
.skin-card.active::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 18px;
    background: conic-gradient(from 0deg, #00d4ff, #b388ff, #ff69b4, #ffd700, #00d4ff);
    z-index: -1;
    animation: skinActiveBorder 3s linear infinite;
    opacity: 0.5;
}
@keyframes skinActiveBorder {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}


.skin-card.locked {
    opacity: 0.45;
    filter: grayscale(0.4);
}
.skin-card.locked:hover {
    transform: translateY(-3px) scale(1.01);
    opacity: 0.6;
}


.skin-preview {
    width: 90px;
    height: 90px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(20, 20, 50, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
}
.skin-card:hover .skin-preview {
    transform: scale(1.1) rotate(5deg);
    border-color: rgba(255, 255, 255, 0.2);
}


.tower-preview {
    font-size: 42px;
    filter: drop-shadow(0 0 10px currentColor);
    transition: transform 0.3s;
}
.skin-card:hover .tower-preview {
    transform: scale(1.15);
}


.skin-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}


.skin-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}


.skin-desc {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.3;
}


.skin-status {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}


.skin-card.active .skin-status {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}


/* ═══════════════════════════════════════════════════════════════════════════
   VFX HYPERCHARGE STYLE BRAWL STARS
   ═══════════════════════════════════════════════════════════════════════════ */


@keyframes hyperchargeFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}


@keyframes hyperchargeIcon {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-30deg); opacity: 0; }
    30% { transform: translate(-50%, -50%) scale(1.5) rotate(10deg); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(-5deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2) rotate(0deg); opacity: 0; }
}


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


@keyframes skinParticle {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}


.skin-unlock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}


.skin-unlock-container {
    text-align: center;
    position: relative;
}


.skin-unlock-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    animation: pulse 1s ease infinite;
}


.skin-unlock-icon {
    font-size: 120px;
    margin-bottom: 20px;
    animation: bounce 0.5s ease infinite alternate;
}


.skin-unlock-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary);
    margin-bottom: 10px;
}


.skin-unlock-name {
    font-size: 24px;
    color: var(--text);
}


.skin-unlock-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}


/* Abilities button style */
.abilities-btn {
    background: linear-gradient(135deg, #ffaa00, #ff6600) !important;
}


.abilities-btn:hover {
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.5);
}


/* Skins button style */
.skins-btn {
    background: linear-gradient(135deg, #ff00ff, #8b00ff) !important;
}


.skins-btn:hover {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}


/* ═══════════════════════════════════════════════════════════════════════════
   SUGGESTIONS DE REACTIONS CHIMIQUES DANS DECK SELECT
   ═══════════════════════════════════════════════════════════════════════════ */


.reaction-suggestions-container {
    background: linear-gradient(135deg, rgba(0, 50, 80, 0.9), rgba(20, 30, 60, 0.9));
    border: 2px solid rgba(0, 200, 255, 0.3);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    max-height: 280px;
    overflow-y: auto;
}


.reactions-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
    color: var(--primary);
}


.reactions-icon {
    font-size: 24px;
    animation: pulse 2s ease infinite;
}


.reactions-count {
    margin-left: auto;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    color: #00ff88;
}


.no-reactions {
    text-align: center;
    color: var(--text-muted);
    padding: 10px;
    font-style: italic;
}


.reactions-section {
    margin-bottom: 15px;
}


.reactions-section .section-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


.active-reactions .section-title {
    color: #00ff88;
}


.possible-reactions .section-title {
    color: #ffaa00;
}


.available-reactions .section-title {
    color: #888;
}


.reaction-suggestion {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    border-left: 4px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}


.reaction-suggestion:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.1);
}


.reaction-suggestion.active {
    border-left-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}


.reaction-suggestion.possible {
    border-left-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}


.reaction-suggestion.available {
    border-left-color: #666;
}


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


.reaction-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
}


.reaction-icon {
    font-size: 20px;
}


.reaction-name {
    font-weight: bold;
    font-size: 14px;
    color: var(--text);
}


.reaction-badge {
    margin-left: auto;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
}


.reaction-badge.active {
    background: #00ff88;
    color: #000;
}


.reaction-badge.possible {
    background: #ffaa00;
    color: #000;
}


.reaction-badge.available {
    background: #444;
    color: #aaa;
}


.reaction-cards {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}


.reaction-card-name {
    padding: 3px 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}


.reaction-card-name.in-deck {
    background: rgba(34, 197, 94, 0.3);
    color: var(--primary);
}


.reaction-card-name.missing {
    background: rgba(255, 170, 0, 0.3);
    color: #ffaa00;
    cursor: pointer;
    border: 1px dashed #ffaa00;
}


.reaction-card-name.missing:hover {
    background: rgba(255, 170, 0, 0.5);
    transform: scale(1.05);
}


.reaction-card-name.available {
    cursor: pointer;
}


.reaction-card-name.available:hover {
    background: rgba(34, 197, 94, 0.3);
}


.reaction-effect {
    font-size: 11px;
    color: #88ff88;
    font-style: italic;
}


/* Responsive for new screens */
@media (max-width: 768px) {
    .abilities-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }


    .ability-slots {
        gap: 10px;
    }


    .ability-slot {
        width: 80px;
        height: 100px;
    }


    .skins-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }


    .reaction-suggestions-container {
        max-height: 200px;
    }


    .reaction-cards {
        font-size: 10px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   REACTIONS ACTIVES EN COMBAT
   ═══════════════════════════════════════════════════════════════════════════ */


.active-reactions-container {
    position: absolute;
    top: 200px;
    left: 10px;
    background: linear-gradient(135deg, rgba(0, 80, 50, 0.9), rgba(20, 60, 40, 0.9));
    border: 2px solid rgba(0, 255, 136, 0.4);
    border-radius: 15px;
    padding: 10px;
    min-width: 150px;
    max-width: 200px;
    z-index: 100;
    backdrop-filter: blur(5px);
}


.active-reactions-title {
    font-size: 12px;
    font-weight: bold;
    color: #00ff88;
    margin-bottom: 8px;
    text-align: center;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
}


.active-reactions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}


.no-active-reaction {
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
    font-style: italic;
}


.active-reaction-item {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 8px;
    border-left: 3px solid #00ff88;
    transition: all 0.3s ease;
}


.active-reaction-item:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateX(3px);
}


.reaction-item-icon {
    font-size: 18px;
    margin-bottom: 3px;
}


.reaction-item-name {
    font-size: 11px;
    font-weight: bold;
    color: var(--text);
}


.reaction-item-effect {
    font-size: 10px;
    color: #88ff88;
}


@keyframes reactionSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Glow effect pour les arcs electriques */
@keyframes electricGlow {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 5px currentColor); }
    50% { filter: brightness(1.5) drop-shadow(0 0 15px currentColor); }
}


/* Responsive */
@media (max-width: 768px) {
    .active-reactions-container {
        top: auto;
        bottom: 220px;
        left: 5px;
        min-width: 120px;
        padding: 8px;
    }


    .active-reaction-item {
        padding: 5px;
    }


    .reaction-item-name {
        font-size: 10px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   BESTIARY / POKEDEX STYLES
   ═══════════════════════════════════════════════════════════════ */


#bestiary-screen {
    background: linear-gradient(180deg, #0a0e1a 0%, #0d1a0d 40%, #0a0e1a 100%);
}


.bestiary-header h2 {
    background: linear-gradient(90deg, #00ff88, #00ccff, #00ff88);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: bestiaryTitleShift 4s ease infinite;
}


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


.bestiary-filters {
    display: flex;
    gap: 8px;
    padding: 0 20px 12px;
    overflow-x: auto;
    flex-shrink: 0;
}


.bestiary-filter {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: #88ccaa;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    font-family: inherit;
}


.bestiary-filter:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.4);
    color: #aaffcc;
}


.bestiary-filter.active {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    color: #00ff88;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}


.bestiary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 10px 20px 30px;
    overflow-y: auto;
    flex: 1;
}


.bestiary-entry {
    background: rgba(0, 20, 10, 0.6);
    border: 2px solid rgba(0, 255, 136, 0.15);
    border-radius: 14px;
    padding: 14px 10px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}


.bestiary-entry::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}


.bestiary-entry:hover {
    transform: translateY(-4px) scale(1.03);
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.15), inset 0 0 30px rgba(0, 255, 136, 0.05);
}


.bestiary-entry:hover::before {
    opacity: 1;
}


.bestiary-entry.undiscovered {
    border-color: rgba(100, 100, 100, 0.2);
    background: rgba(10, 10, 20, 0.5);
    filter: grayscale(0.8);
}


.bestiary-entry.undiscovered:hover {
    transform: translateY(-2px);
    box-shadow: none;
    border-color: rgba(100, 100, 100, 0.3);
}


.bestiary-entry.elite {
    border-color: rgba(255, 100, 50, 0.3);
    background: rgba(30, 10, 5, 0.6);
}


.bestiary-entry.elite:hover {
    border-color: rgba(255, 100, 50, 0.6);
    box-shadow: 0 8px 25px rgba(255, 100, 50, 0.15), inset 0 0 30px rgba(255, 100, 50, 0.05);
}


.bestiary-entry.elite::before {
    background: linear-gradient(90deg, transparent, #ff6432, transparent);
}


.bestiary-icon {
    font-size: 38px;
    display: block;
    margin-bottom: 6px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.4));
    transition: transform 0.3s;
}


.bestiary-entry:hover .bestiary-icon {
    transform: scale(1.15);
}


.bestiary-entry.undiscovered .bestiary-icon {
    filter: brightness(0) invert(0.2);
    font-size: 32px;
}


.bestiary-name {
    font-size: 11px;
    font-weight: 700;
    color: #ddeedd;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.bestiary-entry.undiscovered .bestiary-name {
    color: #555;
}


.bestiary-tier {
    font-size: 9px;
    color: #00cc88;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.bestiary-entry.elite .bestiary-tier {
    color: #ff8844;
}


.bestiary-kills {
    font-size: 9px;
    color: #668877;
    margin-top: 4px;
}


.bestiary-entry-id {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 8px;
    color: rgba(0, 255, 136, 0.3);
    font-family: monospace;
}


/* ─── BESTIARY DETAIL OVERLAY ─── */


.bestiary-detail-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bestiaryOverlayIn 0.3s ease;
}


@keyframes bestiaryOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


.bestiary-detail-card {
    background: linear-gradient(145deg, #0a1a10, #0d0d1a);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    padding: 30px;
    max-width: 440px;
    width: 90%;
    position: relative;
    animation: bestiaryCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.1), inset 0 0 40px rgba(0, 255, 136, 0.03);
}


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


.bestiary-detail-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(255, 50, 50, 0.2);
    border: 1px solid rgba(255, 50, 50, 0.3);
    color: #ff6666;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
}


.bestiary-detail-close:hover {
    background: rgba(255, 50, 50, 0.4);
    transform: rotate(90deg);
}


.bestiary-detail-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}


.bestiary-detail-icon {
    font-size: 64px;
    filter: drop-shadow(0 0 15px rgba(0, 255, 136, 0.5));
    animation: bestiaryIconFloat 3s ease-in-out infinite;
}


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


.bestiary-detail-title {
    flex: 1;
}


.bestiary-detail-title h3 {
    font-size: 22px;
    color: #eeffee;
    margin: 0 0 4px;
}


.bestiary-detail-title .detail-tier {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 2px 10px;
    border-radius: 10px;
    display: inline-block;
}


.detail-tier.normal {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
}


.detail-tier.elite {
    color: #ff8844;
    background: rgba(255, 100, 50, 0.1);
    border: 1px solid rgba(255, 100, 50, 0.2);
}


.bestiary-detail-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}


.bestiary-stat {
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}


.bestiary-stat-label {
    font-size: 9px;
    color: #668877;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}


.bestiary-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #00ffaa;
}


.bestiary-stat-value.hp { color: #ff4444; }
.bestiary-stat-value.dmg { color: #ff8844; }
.bestiary-stat-value.spd { color: #44aaff; }
.bestiary-stat-value.gold { color: #ffcc00; }


.bestiary-detail-special {
    background: rgba(0, 200, 255, 0.08);
    border: 1px solid rgba(0, 200, 255, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}


.bestiary-special-label {
    font-size: 10px;
    color: #44ccff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}


.bestiary-special-value {
    font-size: 14px;
    color: #88ddff;
    font-weight: 600;
}


.bestiary-detail-lore {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid rgba(0, 255, 136, 0.3);
    padding: 10px 14px;
    margin-bottom: 14px;
    border-radius: 0 8px 8px 0;
}


.bestiary-detail-lore p {
    font-size: 12px;
    color: #99bbaa;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}


.bestiary-detail-kills-info {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
}


.bestiary-detail-kills-info span {
    font-size: 12px;
    color: #668877;
}


.bestiary-detail-kills-info strong {
    color: #00ff88;
    font-size: 14px;
}


/* Scan line animation on the detail card */
.bestiary-detail-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.6), transparent);
    animation: bestiaryScanLine 3s linear infinite;
}


@keyframes bestiaryScanLine {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}


/* ═══════════════════════════════════════════════════════════════
   NEW MECHANICS STYLES
   ═══════════════════════════════════════════════════════════════ */


/* ─── ACTIVE ABILITIES BAR ─── */
.active-abilities-container {
    position: absolute;
    left: 10px;
    bottom: 130px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 15;
}


.abilities-title {
    color: #ffaa00;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
}


.active-abilities-bar {
    display: flex;
    gap: 6px;
}


.ability-btn {
    background: linear-gradient(145deg, #0d2b18, #2a2a5e);
    border: 2px solid #4488ff;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    min-width: 65px;
    position: relative;
}


.ability-btn:hover:not(.on-cooldown):not(.no-gold) {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(68, 136, 255, 0.5);
    border-color: #66aaff;
}


.ability-btn.on-cooldown {
    opacity: 0.5;
    border-color: #444;
    cursor: not-allowed;
}


.ability-btn.no-gold {
    opacity: 0.6;
    border-color: #664400;
}


.combat-shortcuts-hint {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}


.combat-shortcuts-hint span {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}


.ability-icon {
    display: block;
    font-size: 20px;
}


.ability-name {
    display: block;
    font-size: 8px;
    color: #aaa;
    margin-top: 2px;
}


.ability-cd {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 9px;
    color: #ff8888;
    font-weight: bold;
}


.ability-cost {
    display: block;
    font-size: 9px;
    color: #ffd700;
}


/* ─── BLOOD CLOT BUTTON ─── */
.clot-btn-container {
    position: absolute;
    right: 10px;
    bottom: 130px;
    z-index: 15;
}


.clot-place-btn {
    background: linear-gradient(145deg, #3a0000, #5a0000);
    border: 2px solid #cc0000;
    border-radius: 10px;
    padding: 8px 14px;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}


.clot-place-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(200, 0, 0, 0.5);
}


/* ─── SPELL/UNIT CARD BADGES ─── */
.spell-badge, .unit-badge, .fusion-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 7px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 8px;
    color: white;
}


.spell-badge {
    background: linear-gradient(135deg, #ff6600, #ff3300);
    box-shadow: 0 0 8px rgba(255, 100, 0, 0.6);
}


.unit-badge {
    background: linear-gradient(135deg, #00cc44, #008833);
    box-shadow: 0 0 8px rgba(0, 200, 60, 0.6);
}


.fusion-badge {
    background: linear-gradient(135deg, #ff44ff, #aa00aa);
    box-shadow: 0 0 8px rgba(255, 68, 255, 0.6);
}


.spell-card {
    border-style: dashed !important;
}


.unit-card {
    border-left: 3px solid #00cc44 !important;
}


.deck-card.dragging {
    opacity: 0.4;
    transform: scale(0.9);
}


.deck-pile-indicator {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 4px 8px;
    color: #aaa;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}


/* ─── SACRIFICE BUTTON ─── */
.sacrifice-btn {
    background: linear-gradient(145deg, #3a0020, #5a0030) !important;
    border-color: #cc0066 !important;
}


.sacrifice-btn:hover {
    background: linear-gradient(145deg, #5a0030, #7a0040) !important;
    box-shadow: 0 0 15px rgba(200, 0, 100, 0.5);
}


/* ─── DNA LAB SCREEN ─── */
/* ═══════════════════════════════════════════
   DNA LAB SCREEN - BIO/GREEN THEME
   ═══════════════════════════════════════════ */
#dna-lab-screen {
    background: linear-gradient(160deg, #050d18, #0a1a2e, #08152a);
}
#dna-lab-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 80%, rgba(0, 255, 136, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 20%, rgba(0, 200, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}
/* Floating DNA helix particles */
#dna-lab-screen::after {
    content: '🧬';
    position: absolute;
    top: 15%;
    right: 8%;
    font-size: 80px;
    opacity: 0.04;
    animation: dnaFloat 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes dnaFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(15deg); }
}


#dna-lab-screen .screen-header {
    text-align: center;
    padding: 16px 20px;
    background: rgba(5, 15, 30, 0.9);
    border-bottom: 1px solid rgba(0, 255, 136, 0.15);
    backdrop-filter: blur(12px);
}


#dna-lab-screen .screen-header h2 {
    color: #00ff88;
    font-size: 24px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    letter-spacing: 1px;
}


.screen-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}


.dna-upgrades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    padding: 16px 20px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 136, 0.2) transparent;
}


.dna-upgrade-card {
    background: linear-gradient(145deg, rgba(8, 20, 40, 0.95), rgba(15, 30, 55, 0.95));
    border: 1px solid rgba(0, 255, 136, 0.08);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.dna-upgrade-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.dna-upgrade-card:hover::before { opacity: 1; }


.dna-upgrade-card:hover:not(.maxed):not(.locked) {
    border-color: rgba(0, 255, 136, 0.35);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 255, 136, 0.12), 0 0 0 1px rgba(0, 255, 136, 0.1);
}


.dna-upgrade-card.maxed {
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(145deg, rgba(25, 20, 10, 0.95), rgba(35, 30, 15, 0.95));
}
.dna-upgrade-card.maxed::before {
    opacity: 1;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.4), transparent);
}


.dna-upgrade-card.locked {
    opacity: 0.45;
    filter: grayscale(0.3);
}


.dna-upgrade-icon {
    font-size: 40px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 8px currentColor);
    transition: transform 0.3s;
}
.dna-upgrade-card:hover .dna-upgrade-icon {
    transform: scale(1.2) rotate(-8deg);
}


.dna-upgrade-name {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}


.dna-upgrade-desc {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    margin-bottom: 8px;
    line-height: 1.3;
}


.dna-upgrade-level {
    color: #00ff88;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}


.dna-upgrade-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 255, 136, 0.06);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 255, 136, 0.1);
}


.dna-upgrade-fill {
    height: 100%;
    background: linear-gradient(90deg, #00cc66, #00ff88, #66ffaa);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}


.dna-upgrade-btn {
    background: linear-gradient(145deg, #00aa55, #008844);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    color: white;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
}
.dna-upgrade-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}
.dna-upgrade-btn:hover:not(:disabled)::before { left: 100%; }


.dna-upgrade-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 170, 85, 0.4);
    border-color: rgba(0, 255, 136, 0.5);
}
.dna-upgrade-btn:active:not(:disabled) {
    transform: scale(0.97);
    transition-duration: 0.1s;
}


.dna-upgrade-btn:disabled {
    background: rgba(40, 40, 60, 0.8);
    border-color: transparent;
    cursor: not-allowed;
    opacity: 0.4;
}


.dna-upgrade-max {
    color: #ffd700;
    font-weight: 800;
    font-size: 14px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    letter-spacing: 2px;
    animation: maxGlow 2s ease-in-out infinite;
}
@keyframes maxGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.2); }
}


/* ─── DNA LAB PURCHASE ANIMATIONS ─── */
@keyframes dna-purchase-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(0,255,136,0); }
    30% { transform: scale(1.08); box-shadow: 0 0 40px rgba(0,255,136,0.6), inset 0 0 30px rgba(0,255,136,0.15); }
    60% { transform: scale(0.97); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(0,255,136,0); }
}
@keyframes dna-purchase-flash {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-60px) scale(1.5); }
}
@keyframes dna-particle-fly {
    0% { opacity: 1; transform: translate(0,0) scale(1); }
    100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0); }
}
@keyframes dna-bar-glow {
    0% { filter: brightness(1); }
    50% { filter: brightness(2.5) drop-shadow(0 0 8px #00ff88); }
    100% { filter: brightness(1); }
}
@keyframes dna-icon-bounce {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.4) rotate(-15deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    75% { transform: scale(1.2) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes dna-gems-count-tick {
    0% { transform: scale(1); color: #00ff88; }
    50% { transform: scale(1.3); color: #ff4488; }
    100% { transform: scale(1); color: #00ff88; }
}
@keyframes dna-level-up-text {
    0% { opacity: 0; transform: translateY(10px); }
    40% { opacity: 1; transform: translateY(-5px); }
    100% { opacity: 0; transform: translateY(-30px); }
}
@keyframes dna-maxed-celebration {
    0% { border-color: #ffd700; box-shadow: 0 0 0 rgba(255,215,0,0); }
    50% { border-color: #ffee00; box-shadow: 0 0 50px rgba(255,215,0,0.5), 0 0 100px rgba(255,215,0,0.2); }
    100% { border-color: #ffd700; box-shadow: 0 0 15px rgba(255,215,0,0.2); }
}


.dna-upgrade-card.purchasing {
    animation: dna-purchase-pulse 0.6s ease-out;
}
.dna-upgrade-card.just-maxed {
    animation: dna-maxed-celebration 1s ease-out;
}
.dna-upgrade-icon.bouncing {
    animation: dna-icon-bounce 0.5s ease-out;
}
.dna-upgrade-fill.glowing {
    animation: dna-bar-glow 0.6s ease-out;
}
.dna-gems-count.ticking {
    animation: dna-gems-count-tick 0.4s ease-out;
}


.dna-purchase-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    pointer-events: none;
    animation: dna-particle-fly 0.8s ease-out forwards;
    z-index: 100;
}
.dna-purchase-particle.gem {
    background: radial-gradient(circle, #ff88ff, #aa44ff);
    box-shadow: 0 0 6px #cc44ff;
}
.dna-purchase-particle.spark {
    width: 4px;
    height: 4px;
    background: #ffee00;
    box-shadow: 0 0 4px #ffcc00;
}


.dna-level-up-float {
    position: absolute;
    color: #00ff88;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(0,255,136,0.8), 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
    animation: dna-level-up-text 1s ease-out forwards;
    z-index: 100;
}


/* DNA Lab background DNA helix animation */
#dna-lab-screen {
    overflow: hidden;
}
.dna-helix-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    opacity: 0.08;
    z-index: 0;
}
.dna-upgrades-grid {
    position: relative;
    z-index: 1;
}


/* ─── COMBAT EVENT OVERLAY ─── */
@keyframes combat-event-appear {
    0% { transform: scale(0.3) translateY(-20px); opacity: 0; }
    60% { transform: scale(1.1) translateY(0); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes combat-event-urgent {
    0%, 100% { border-color: #ff4400; box-shadow: 0 0 15px rgba(255,68,0,0.3); }
    50% { border-color: #ffaa00; box-shadow: 0 0 30px rgba(255,170,0,0.5); }
}
@keyframes combat-event-timer-pulse {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(1.02); filter: brightness(1.5); }
}


.combat-event-popup {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, rgba(20,10,40,0.95), rgba(40,20,60,0.95));
    border: 2px solid #ff8800;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    text-align: center;
    z-index: 50;
    animation: combat-event-appear 0.4s ease-out;
    min-width: 250px;
    pointer-events: auto;
}
.combat-event-popup.urgent {
    animation: combat-event-appear 0.4s ease-out, combat-event-urgent 0.8s ease-in-out infinite 0.4s;
}
.combat-event-title {
    font-size: 16px;
    font-weight: bold;
    color: #ffaa00;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(255,170,0,0.5);
}
.combat-event-desc {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 8px;
}
.combat-event-timer-bar {
    width: 100%;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.combat-event-timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4400, #ffaa00);
    border-radius: 3px;
    transition: width 0.1s linear;
}
.combat-event-reward {
    font-size: 11px;
    color: #00ff88;
}
.combat-event-btn {
    background: linear-gradient(145deg, #ff6600, #cc4400);
    border: none;
    border-radius: 6px;
    color: white;
    padding: 6px 14px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    margin-top: 6px;
    transition: all 0.2s;
}
.combat-event-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255,102,0,0.5);
}


/* ─── MUTATION CHOICE OVERLAY ─── */
.mutation-choice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}


.mutation-choice-panel {
    background: linear-gradient(145deg, #0d2b18, #0a0a2e);
    border: 2px solid #aa44ff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 0 40px rgba(170, 68, 255, 0.3);
}


.mutation-choice-panel h2 {
    color: #aa44ff;
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(170, 68, 255, 0.5);
}


.mutation-choice-panel p {
    color: #aaa;
    margin-bottom: 20px;
}


.mutation-choices {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}


.mutation-choice-card {
    background: linear-gradient(145deg, #2a2a4e, #0d2b18);
    border: 2px solid #444;
    border-radius: 12px;
    padding: 20px;
    width: 180px;
    cursor: pointer;
    transition: all 0.3s;
}


.mutation-choice-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}


.mutation-choice-icon {
    font-size: 36px;
    margin-bottom: 10px;
}


.mutation-choice-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
}


.mutation-choice-desc {
    color: #aaa;
    font-size: 11px;
    line-height: 1.4;
}


.mutation-skip-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #555;
    border-radius: 8px;
    color: #888;
    padding: 10px 25px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}


.mutation-skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ccc;
}


/* ─── DAILY CHALLENGE SCREEN ─── */
#daily-challenge-screen {
    background: linear-gradient(135deg, #0a0a2e, #1a1a0e);
}


#daily-challenge-screen .screen-header {
    text-align: center;
    padding: 20px;
}


#daily-challenge-screen .screen-header h2 {
    color: #ffaa00;
    font-size: 28px;
    text-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
}


.daily-challenge-content {
    display: flex;
    justify-content: center;
    padding: 20px;
}


.daily-challenge-card {
    background: linear-gradient(145deg, #0d2b18, #2a2a5e);
    border: 2px solid #ffaa00;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 0 30px rgba(255, 170, 0, 0.15);
}


.daily-challenge-card h3 {
    color: #ffaa00;
    font-size: 22px;
    margin-bottom: 15px;
}


.daily-level {
    color: #ddd;
    font-size: 16px;
    margin-bottom: 20px;
}


.daily-modifiers {
    margin-bottom: 20px;
}


.daily-modifier {
    background: rgba(255, 100, 0, 0.1);
    border: 1px solid rgba(255, 100, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    color: #ddd;
    font-size: 13px;
}


.daily-modifier strong {
    color: #ffaa00;
}


.daily-rewards {
    color: #00ff88;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}


.daily-start-btn {
    background: linear-gradient(145deg, #ff8800, #cc6600);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 12px 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
}


.daily-start-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.5);
}


.daily-start-btn:disabled {
    background: #333;
    cursor: not-allowed;
    opacity: 0.5;
}


/* ─── BACK BUTTON (generic) ─── */
.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #555;
    border-radius: 8px;
    color: #aaa;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    position: absolute;
    left: 20px;
    top: 20px;
}


.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}


/* ─── MENU BUTTONS FOR NEW FEATURES ─── */
.dna-lab-btn {
    background: linear-gradient(145deg, #004422, #006633) !important;
    border-color: #00ff88 !important;
}


.daily-btn {
    background: linear-gradient(145deg, #442200, #663300) !important;
    border-color: #ffaa00 !important;
}


/* ═══════════════════════════════════════════════════════════════
   MULTIPLAYER STYLES
   ═══════════════════════════════════════════════════════════════ */


#multiplayer-screen {
    background: linear-gradient(180deg, #030f07 0%, #1a0a2a 50%, #030f07 100%);
}


.mp-header h2 {
    background: linear-gradient(90deg, #ff4488, #aa44ff, #4488ff);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: mpTitleShift 3s ease infinite;
}


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


.mp-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


.mp-mode-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(255, 68, 136, 0.1), rgba(100, 50, 255, 0.1));
    border: 1px solid rgba(255, 68, 136, 0.2);
    border-radius: 14px;
    padding: 16px 22px;
    width: 100%;
    max-width: 500px;
}


.mp-mode-icon {
    font-size: 36px;
    animation: mpIconPulse 2s ease-in-out infinite;
}


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


.mp-mode-title {
    font-size: 16px;
    font-weight: 800;
    color: #ff88bb;
    letter-spacing: 2px;
}


.mp-mode-desc {
    font-size: 11px;
    color: #8877aa;
    margin-top: 2px;
}


.mp-options {
    display: flex;
    gap: 20px;
    align-items: center;
    width: 100%;
    max-width: 600px;
    flex-wrap: wrap;
    justify-content: center;
}


.mp-option-card {
    flex: 1;
    min-width: 220px;
    max-width: 260px;
    background: rgba(15, 10, 30, 0.8);
    border: 2px solid rgba(100, 50, 200, 0.2);
    border-radius: 18px;
    padding: 24px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}


.mp-option-card:hover {
    border-color: rgba(100, 50, 200, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(100, 50, 200, 0.15);
}


.mp-option-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(100, 50, 200, 0.05) 0%, transparent 60%);
    pointer-events: none;
}


.mp-option-icon {
    font-size: 42px;
    display: block;
    margin-bottom: 10px;
}


.mp-option-card h3 {
    font-size: 16px;
    color: #ddccff;
    margin: 0 0 6px;
}


.mp-option-card p {
    font-size: 11px;
    color: #776699;
    margin: 0 0 14px;
}


.mp-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(100, 50, 200, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    color: #eeddff;
    font-size: 13px;
    outline: none;
    margin-bottom: 10px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}


.mp-input:focus {
    border-color: rgba(100, 50, 200, 0.7);
    box-shadow: 0 0 12px rgba(100, 50, 200, 0.2);
}


.mp-input::placeholder {
    color: #554477;
}


.mp-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    letter-spacing: 1px;
}


.mp-btn-create {
    background: linear-gradient(135deg, #ff4488, #cc2266);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 68, 136, 0.3);
}


.mp-btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 136, 0.5);
}


.mp-btn-join {
    background: linear-gradient(135deg, #4488ff, #2266cc);
    color: white;
    box-shadow: 0 4px 15px rgba(68, 136, 255, 0.3);
}


.mp-btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(68, 136, 255, 0.5);
}


.mp-btn-start {
    background: linear-gradient(135deg, #44ff88, #22cc66);
    color: #0a2a10;
    font-size: 18px;
    padding: 16px 40px;
    box-shadow: 0 4px 20px rgba(68, 255, 136, 0.3);
    animation: mpStartPulse 2s ease-in-out infinite;
}


@keyframes mpStartPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(68, 255, 136, 0.3); }
    50% { box-shadow: 0 4px 35px rgba(68, 255, 136, 0.6); }
}


.mp-btn-start:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 30px rgba(68, 255, 136, 0.5);
}


.mp-divider {
    display: flex;
    align-items: center;
    color: #443366;
    font-size: 14px;
    font-weight: 700;
}


.mp-status {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(100, 50, 200, 0.1);
    border: 1px solid rgba(100, 50, 200, 0.2);
    border-radius: 12px;
    padding: 14px 20px;
    color: #aa88ff;
    font-size: 13px;
}


.mp-status-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(170, 136, 255, 0.2);
    border-top-color: #aa88ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


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


/* ─── MULTIPLAYER LOBBY ─── */


#mp-lobby-screen {
    background: linear-gradient(180deg, #030f07 0%, #0a1a2a 100%);
}


.mp-lobby-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 20px;
    gap: 20px;
    overflow-y: auto;
}


.mp-lobby-header {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 500px;
}


.mp-lobby-header h2 {
    flex: 1;
    text-align: center;
    font-size: 22px;
    color: #eeddff;
    margin: 0;
}


.mp-room-code-display {
    background: linear-gradient(135deg, rgba(100, 50, 200, 0.1), rgba(50, 100, 200, 0.1));
    border: 2px solid rgba(100, 50, 200, 0.3);
    border-radius: 16px;
    padding: 18px 30px;
    text-align: center;
    position: relative;
}


.mp-code-label {
    font-size: 10px;
    color: #776699;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}


.mp-code-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 5px;
    color: #ddbbff;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(170, 100, 255, 0.5);
}


.mp-copy-btn {
    margin-top: 10px;
    background: rgba(100, 50, 200, 0.2);
    border: 1px solid rgba(100, 50, 200, 0.3);
    color: #aa88ff;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    font-family: inherit;
}


.mp-copy-btn:hover {
    background: rgba(100, 50, 200, 0.35);
}


.mp-players-list {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.mp-player-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 10, 30, 0.6);
    border: 2px solid rgba(100, 50, 200, 0.2);
    border-radius: 14px;
    padding: 14px 18px;
    animation: mpPlayerSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}


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


.mp-player-card.host {
    border-color: rgba(255, 68, 136, 0.4);
    background: rgba(255, 68, 136, 0.05);
}


.mp-player-card.guest {
    border-color: rgba(68, 136, 255, 0.4);
    background: rgba(68, 136, 255, 0.05);
}


.mp-player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}


.mp-player-card.host .mp-player-avatar {
    background: linear-gradient(135deg, #ff4488, #cc2266);
}


.mp-player-card.guest .mp-player-avatar {
    background: linear-gradient(135deg, #4488ff, #2266cc);
}


.mp-player-info {
    flex: 1;
}


.mp-player-name {
    font-size: 15px;
    font-weight: 700;
    color: #eeddff;
}


.mp-player-role {
    font-size: 10px;
    color: #776699;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.mp-player-ready {
    font-size: 20px;
}


.mp-boss-preview {
    background: rgba(255, 50, 50, 0.05);
    border: 1px solid rgba(255, 50, 50, 0.15);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    width: 100%;
    max-width: 400px;
}


.mp-boss-preview h3 {
    font-size: 14px;
    color: #ff8888;
    margin: 0 0 12px;
}


.mp-boss-list {
    display: flex;
    justify-content: center;
    gap: 10px;
}


.mp-boss-icon-slot {
    width: 50px;
    height: 50px;
    background: rgba(255, 50, 50, 0.1);
    border: 2px solid rgba(255, 50, 50, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
}


.mp-boss-icon-slot .mp-boss-round {
    position: absolute;
    bottom: -6px;
    font-size: 8px;
    background: rgba(255, 50, 50, 0.8);
    color: white;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 700;
}


.mp-lobby-actions {
    text-align: center;
    margin-top: auto;
    padding: 20px 0;
}


.mp-waiting-text {
    color: #776699;
    font-size: 14px;
    animation: mpWaitingPulse 2s ease-in-out infinite;
}


@keyframes mpWaitingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}


/* ─── MULTIPLAYER BOSS CINEMATIC ─── */


#mp-boss-cinematic {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 500;
    background: #000;
    overflow: hidden;
}


.mp-cine-bg {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}


.mp-cine-scanlines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 2;
}


.mp-cine-content {
    text-align: center;
    z-index: 3;
    animation: mpCineContentIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}


@keyframes mpCineContentIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}


.mp-cine-vs {
    font-size: 80px;
    font-weight: 900;
    color: #ff2244;
    text-shadow: 0 0 40px rgba(255, 34, 68, 0.8), 0 0 80px rgba(255, 34, 68, 0.4);
    letter-spacing: 20px;
    animation: mpCineVsPulse 1s ease-in-out infinite;
    margin-bottom: 20px;
}


@keyframes mpCineVsPulse {
    0%, 100% { transform: scale(1); text-shadow: 0 0 40px rgba(255, 34, 68, 0.8); }
    50% { transform: scale(1.1); text-shadow: 0 0 60px rgba(255, 34, 68, 1), 0 0 120px rgba(255, 34, 68, 0.5); }
}


.mp-cine-boss-info {
    margin-bottom: 30px;
}


.mp-cine-boss-icon {
    font-size: 80px;
    display: block;
    animation: mpCineBossFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 50, 50, 0.6));
}


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


.mp-cine-boss-name {
    font-size: 36px;
    font-weight: 900;
    color: #ff4444;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
    margin-top: 10px;
    letter-spacing: 4px;
}


.mp-cine-boss-title {
    font-size: 14px;
    color: #ff8888;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 4px;
}


.mp-cine-boss-hp {
    font-size: 12px;
    color: #cc4444;
    margin-top: 8px;
    font-family: monospace;
    letter-spacing: 2px;
}


.mp-cine-players {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}


.mp-cine-player {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 18px;
}


.mp-cine-player-icon {
    font-size: 24px;
}


.mp-cine-player-name {
    font-size: 14px;
    color: #ddddff;
    font-weight: 600;
}


.mp-cine-round {
    font-size: 18px;
    font-weight: 800;
    color: #ffaa00;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
}


.mp-cine-bar {
    position: absolute;
    left: 0; right: 0;
    height: 60px;
    background: #ff2244;
    z-index: 1;
}


.mp-cine-bar-top {
    top: -60px;
    animation: mpCineBarTop 0.6s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


.mp-cine-bar-bottom {
    bottom: -60px;
    animation: mpCineBarBottom 0.6s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


@keyframes mpCineBarTop {
    to { top: 0; }
}


@keyframes mpCineBarBottom {
    to { bottom: 0; }
}


/* ─── MULTIPLAYER RESULT ─── */


#mp-result-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}


.mp-result-container {
    text-align: center;
    animation: mpResultIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 450px;
    width: 90%;
}


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


.mp-result-title {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 6px;
    margin-bottom: 8px;
}


.mp-result-title.victory {
    color: #44ff88;
    text-shadow: 0 0 30px rgba(68, 255, 136, 0.5);
}


.mp-result-title.defeat {
    color: #ff4444;
    text-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
}


.mp-result-subtitle {
    font-size: 14px;
    color: #8888aa;
    margin-bottom: 24px;
}


.mp-result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}


.mp-result-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
}


.mp-result-stat-label {
    font-size: 10px;
    color: #666688;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.mp-result-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #ddddff;
    margin-top: 4px;
}


/* ─── MULTIPLAYER HUD (in combat) ─── */


.mp-hud-overlay {
    position: absolute;
    top: 50px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 20;
}


.mp-hud-player {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #ccccdd;
    border: 1px solid rgba(100, 50, 200, 0.2);
}


.mp-hud-player.you {
    border-color: rgba(255, 68, 136, 0.4);
}


.mp-hud-player .mp-hud-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #44ff88;
}


.mp-hud-boss-round {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 34, 68, 0.15);
    border: 1px solid rgba(255, 34, 68, 0.3);
    border-radius: 10px;
    padding: 4px 16px;
    color: #ff6688;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    z-index: 20;
}


/* ─── EMOTE SYSTEM ─── */


.mp-emote-bar {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
    z-index: 20;
}


.mp-emote-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}


.mp-emote-btn:hover {
    transform: scale(1.2);
    background: rgba(100, 50, 200, 0.3);
}


.mp-emote-bubble {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 28px;
    animation: mpEmotePop 2s ease forwards;
    pointer-events: none;
    z-index: 30;
}


@keyframes mpEmotePop {
    0% { opacity: 0; transform: scale(0.5) translateY(10px); }
    15% { opacity: 1; transform: scale(1.2) translateY(-10px); }
    30% { transform: scale(1) translateY(-15px); }
    80% { opacity: 1; transform: translateY(-25px); }
    100% { opacity: 0; transform: translateY(-40px); }
}


/* Ready Check Overlay */
#mp-ready-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}
.mp-ready-card {
    background: linear-gradient(135deg, #071a0f, #0a2218);
    border: 2px solid #e94560;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    min-width: 400px;
    box-shadow: 0 0 40px rgba(233, 69, 96, 0.3);
}
.mp-ready-title {
    font-size: 28px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 8px;
}
.mp-ready-subtitle {
    font-size: 16px;
    color: #aaa;
    margin-bottom: 30px;
}
.mp-ready-players {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}
.mp-ready-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    color: #ddd;
}
.mp-ready-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.mp-ready-dot.pending {
    background: #666;
    box-shadow: 0 0 6px rgba(100,100,100,0.5);
}
.mp-ready-dot.ready {
    background: #00ff88;
    box-shadow: 0 0 12px rgba(0,255,136,0.6);
    animation: readyPulse 1s ease infinite;
}
@keyframes readyPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}
.mp-ready-status {
    margin-left: auto;
    font-size: 13px;
    color: #888;
}
.mp-ready-btn {
    background: linear-gradient(135deg, #00c853, #00e676);
    border: none;
    color: #000;
    font-size: 18px;
    font-weight: bold;
    padding: 15px 50px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mp-ready-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0,200,83,0.4);
}
.mp-ready-btn:disabled {
    cursor: default;
}





