/* ================================================================
   css/ui.css — EcoBalance
   Барлық UI компоненттері: басқару, квест, білім, модал,
   мини-ойындар, бастау экраны, оқулық, апат, жеңіс
   All UI components: controls, quests, education, modals,
   mini-games, start screen, tutorial, disaster, victory.
   ================================================================ */

/* ============ CONTROLS ============ */
.controls-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.control-btn {
    padding: 15px; border: none; border-radius: 12px; cursor: pointer;
    font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 14px;
    transition: all 0.3s; text-transform: uppercase;
    position: relative; overflow: hidden;
}
.control-btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}
.control-btn:hover::before { left: 100%; }
.btn-plant   { background: linear-gradient(135deg, #4ade80, #16a34a); color: white; }
.btn-solar   { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1e293b; }
.btn-recycle { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: white; }
.btn-transport { background: linear-gradient(135deg, #a855f7, #7c3aed); color: white; }
.control-btn:hover  { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.control-btn:active { transform: translateY(0); }

/* Ripple effect on buttons */
.ripple-wave {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,0.35); pointer-events: none;
    transform: translate(-50%,-50%) scale(0);
    animation: rippleGo 0.55s ease-out forwards;
}

/* ============ QUESTS ============ */
.quest-item {
    padding: 15px; margin-bottom: 15px;
    background: linear-gradient(135deg, rgba(74,222,128,0.1), rgba(59,130,246,0.1));
    border: 1px solid rgba(74,222,128,0.3);
    border-radius: 12px; cursor: pointer; transition: all 0.3s;
    position: relative; overflow: hidden;
}
.quest-item:hover  { transform: translateX(5px); border-color: #4ade80; box-shadow: 0 5px 15px rgba(74,222,128,0.2); }
.quest-item.completed { opacity: 0.6; border-color: #22c55e; }
.quest-item.completed::after {
    content: '✓'; position: absolute; right: 15px; top: 50%;
    transform: translateY(-50%); font-size: 20px; color: #22c55e;
}
.quest-title  { font-weight: 700; color: #4ade80; margin-bottom: 5px; }
.quest-desc   { font-size: 13px; color: #cbd5e1; margin-bottom: 8px; }
.quest-reward { font-size: 12px; color: #fbbf24; font-weight: 600; }

/* ============ EDUCATION SECTION ============ */
.edu-section { margin-top: 40px; }
.edu-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin-top: 20px; }
.edu-card {
    background: rgba(13,33,55,0.8);
    border: 1px solid rgba(74,222,128,0.2);
    border-radius: 20px; padding: 25px;
    transition: all 0.3s; cursor: pointer; position: relative; overflow: hidden;
}
.edu-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, #4ade80, #3b82f6);
    transform: scaleX(0); transition: transform 0.3s;
}
.edu-card:hover::before { transform: scaleX(1); }
.edu-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); border-color: #4ade80; }
.edu-icon  { font-size: 48px; margin-bottom: 15px; }
.edu-title { font-family: 'Orbitron', sans-serif; font-size: 20px; color: #4ade80; margin-bottom: 10px; }
.edu-text  { color: #94a3b8; line-height: 1.6; font-size: 15px; }

/* ============ MODAL ============ */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1000;
    justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: linear-gradient(135deg, #0d2137, #1a3a2f);
    border: 2px solid #4ade80; border-radius: 20px;
    padding: 40px; max-width: 600px; width: 90%;
    max-height: 80vh; overflow-y: auto;
    position: relative; animation: modalPop 0.3s ease;
}
.close-btn { position: absolute; top: 15px; right: 15px; font-size: 30px; cursor: pointer; color: #94a3b8; transition: color 0.3s; }
.close-btn:hover { color: #4ade80; }

/* ============ MODAL TABS ============ */
.edu-tabs { display: flex; gap: 8px; margin: 18px 0 22px; flex-wrap: wrap; }
.edu-tab {
    padding: 8px 18px; border: 1px solid rgba(74,222,128,0.22);
    background: transparent; color: #64748b;
    border-radius: 25px; cursor: pointer;
    font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 600;
    transition: all 0.25s;
}
.edu-tab:hover { border-color: #4ade80; color: #4ade80; }
.edu-tab.active { background: rgba(74,222,128,0.12); border-color: #4ade80; color: #4ade80; }

/* ============ MODAL CONTENT PIECES ============ */
.stat-tile { padding: 14px; border-radius: 12px; text-align: center; }
.stat-tile-val { font-family: 'Orbitron', sans-serif; font-size: 22px; font-weight: 700; }
.stat-tile-lbl { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.fact-card {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 16px; background: rgba(74,222,128,0.05);
    border: 1px solid rgba(74,222,128,0.12); border-radius: 12px;
    margin-bottom: 10px; transition: all 0.25s;
}
.fact-card:hover { background: rgba(74,222,128,0.1); transform: translateX(4px); }
.fact-card-num {
    font-family: 'Orbitron', sans-serif; font-size: 20px; color: #4ade80;
    font-weight: 900; min-width: 56px; text-align: center; padding-top: 2px;
}
.fact-card-txt { font-size: 13.5px; color: #cbd5e1; line-height: 1.65; }
.tip-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(74,222,128,0.07); }
.tip-row:last-child { border: none; }
.tip-row-icon { font-size: 22px; flex-shrink: 0; }
.tip-row-txt  { font-size: 13.5px; color: #cbd5e1; line-height: 1.6; }
.quiz-opt {
    display: block; width: 100%; padding: 11px 16px;
    border: 1px solid rgba(148,163,184,0.18); background: transparent;
    border-radius: 10px; cursor: pointer; color: #94a3b8;
    font-size: 14px; text-align: left; margin-bottom: 9px;
    transition: all 0.25s; font-family: 'Rajdhani', sans-serif;
}
.quiz-opt:hover:not(:disabled) { border-color: #4ade80; color: #4ade80; background: rgba(74,222,128,0.06); }
.quiz-opt.correct { border-color: #4ade80 !important; background: rgba(74,222,128,0.14) !important; color: #4ade80 !important; }
.quiz-opt.wrong   { border-color: #ef4444 !important; background: rgba(239,68,68,0.1)  !important; color: #f87171 !important; }

/* ============ ECO DRAWER (collapsible section) ============ */
.eco-drawer {
    background: rgba(13,33,55,0.8);
    border: 1px solid rgba(74,222,128,0.18);
    border-radius: 18px; overflow: hidden; margin-top: 28px;
}
.eco-drawer-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; cursor: pointer; transition: background 0.25s;
}
.eco-drawer-hdr:hover { background: rgba(74,222,128,0.06); }
.eco-drawer-arrow { font-size: 12px; color: #4ade80; transition: transform 0.3s; }
.eco-drawer-arrow.open { transform: rotate(180deg); }
.eco-drawer-body { max-height: 0; overflow: hidden; transition: max-height 0.5s ease, padding 0.3s ease; }
.eco-drawer-body.open { max-height: 800px; padding: 0 24px 24px; }

/* ============ RECYCLE MINI-GAME ============ */
.minigame-container {
    display: none; position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #0d2137; border: 3px solid #4ade80; border-radius: 20px;
    padding: 30px; z-index: 1001;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.sorting-game { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.bin {
    height: 150px; border: 3px dashed; border-radius: 15px;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; font-size: 40px; transition: all 0.3s;
}
.bin.organic { border-color: #4ade80; background: rgba(74,222,128,0.1); }
.bin.plastic  { border-color: #3b82f6; background: rgba(59,130,246,0.1); }
.bin.paper    { border-color: #fbbf24; background: rgba(251,191,36,0.1); }
.waste-item {
    padding: 10px 20px; background: white; color: #0d2137;
    border-radius: 8px; margin: 5px; cursor: grab; font-weight: 600; display: inline-block;
}

/* ============ FACTS TICKER ============ */
.facts-ticker {
    overflow: hidden; position: relative;
    background: rgba(8,20,40,0.9);
    border-top: 1px solid rgba(74,222,128,0.15);
    border-bottom: 1px solid rgba(74,222,128,0.15);
    padding: 10px 0; margin: 30px 0 0;
}
.facts-ticker::before, .facts-ticker::after {
    content: ''; position: absolute; top: 0; width: 90px; height: 100%; z-index: 2;
}
.facts-ticker::before { left: 0;  background: linear-gradient(to right, rgba(8,20,40,0.95), transparent); }
.facts-ticker::after  { right: 0; background: linear-gradient(to left,  rgba(8,20,40,0.95), transparent); }
.facts-label {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    font-family: 'Orbitron', sans-serif; font-size: 9px; color: #4ade80;
    letter-spacing: 3px; z-index: 3;
    background: rgba(8,20,40,0.9); padding: 2px 8px; border-radius: 4px;
}
.facts-track { display: flex; width: max-content; animation: tickerRoll 50s linear infinite; }
.facts-track:hover { animation-play-state: paused; }
.fact-chip { padding: 0 44px; font-size: 13px; color: #64748b; white-space: nowrap; }
.fact-chip b { color: #4ade80; }

/* ============ SCROLL REVEAL ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.from-left  { transform: translateX(-36px); }
.reveal.from-right { transform: translateX(36px); }
.reveal.visible    { opacity: 1 !important; transform: translate(0) !important; }

/* ============ START SCREEN ============ */
#startScreen {
    position: fixed; inset: 0; z-index: 9000;
    background: linear-gradient(135deg, #020c1b 0%, #0a1a2e 45%, #051a0d 100%);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; text-align: center;
    transition: opacity 0.8s ease, visibility 0.8s ease; overflow: hidden;
}
#startScreen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.ss-scanlines {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(74,222,128,0.012) 2px, rgba(74,222,128,0.012) 4px);
    pointer-events: none;
}
.ss-glow-ring {
    position: absolute; width: 600px; height: 600px; border-radius: 50%;
    border: 1px solid rgba(74,222,128,0.07);
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    animation: ringPulse 4s ease-in-out infinite;
}
.ss-glow-ring:nth-child(2) { width: 900px; height: 900px; animation-delay: 1.5s; border-color: rgba(59,130,246,0.05); }
.ss-logo {
    font-size: 96px; margin-bottom: 20px;
    animation: logoBounce 3.5s ease-in-out infinite;
    position: relative; z-index: 1;
    filter: drop-shadow(0 0 30px rgba(74,222,128,0.6));
}
.ss-title {
    font-family: 'Orbitron', sans-serif; font-size: 58px; font-weight: 900;
    background: linear-gradient(135deg, #4ade80 0%, #22d3ee 50%, #818cf8 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    letter-spacing: 5px; margin-bottom: 6px; position: relative; z-index: 1;
}
.ss-sub { color: #475569; font-size: 15px; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 48px; position: relative; z-index: 1; }
.ss-features { display: flex; gap: 16px; justify-content: center; margin-bottom: 48px; flex-wrap: wrap; position: relative; z-index: 1; }
.ss-feat { padding: 9px 18px; background: rgba(74,222,128,0.06); border: 1px solid rgba(74,222,128,0.18); border-radius: 30px; font-size: 13px; color: #64748b; letter-spacing: 1px; }
.ss-buttons { display: flex; flex-direction: column; align-items: center; gap: 14px; position: relative; z-index: 1; }
.btn-ss-main {
    padding: 18px 72px; font-family: 'Orbitron', sans-serif;
    font-size: 17px; font-weight: 700; letter-spacing: 3px;
    background: linear-gradient(135deg, #4ade80, #22c55e); color: #021008;
    border: none; border-radius: 50px; cursor: pointer;
    box-shadow: 0 0 40px rgba(74,222,128,0.35), 0 0 80px rgba(74,222,128,0.1);
    transition: all 0.3s; text-transform: uppercase;
}
.btn-ss-main:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 12px 50px rgba(74,222,128,0.55); }
.btn-ss-continue {
    padding: 13px 52px; font-family: 'Orbitron', sans-serif;
    font-size: 13px; letter-spacing: 2px;
    background: transparent; color: #4ade80;
    border: 2px solid rgba(74,222,128,0.35); border-radius: 50px; cursor: pointer;
    transition: all 0.3s; text-transform: uppercase;
}
.btn-ss-continue:hover { background: rgba(74,222,128,0.08); border-color: #4ade80; transform: translateY(-2px); }
.ss-version { position: absolute; bottom: 24px; font-size: 11px; color: #1e3a2f; letter-spacing: 2px; font-family: 'Orbitron', sans-serif; }

/* ============ DIFFICULTY SELECTOR ============ */
.diff-row    { display: flex; gap: 10px; justify-content: center; margin-bottom: 26px; flex-wrap: wrap; position: relative; z-index: 1; }
.diff-btn {
    padding: 11px 20px; border-radius: 14px; border: 2px solid;
    background: transparent; cursor: pointer;
    font-family: 'Orbitron', sans-serif; font-size: 11px; font-weight: 700;
    letter-spacing: 1px; transition: all 0.25s; min-width: 100px; text-align: center; line-height: 1.6;
}
.diff-btn:hover { transform: translateY(-4px); }
.diff-btn.easy   { border-color: #4ade80; color: #4ade80; }
.diff-btn.easy.active   { background: rgba(74,222,128,0.15); box-shadow: 0 0 22px rgba(74,222,128,0.45); transform: translateY(-4px); }
.diff-btn.normal { border-color: #fbbf24; color: #fbbf24; }
.diff-btn.normal.active { background: rgba(251,191,36,0.15); box-shadow: 0 0 22px rgba(251,191,36,0.45); transform: translateY(-4px); }
.diff-btn.hard   { border-color: #ef4444; color: #f87171; }
.diff-btn.hard.active   { background: rgba(239,68,68,0.15); box-shadow: 0 0 22px rgba(239,68,68,0.45); transform: translateY(-4px); }
.diff-caption { font-size: 10px; letter-spacing: 3px; color: #475569; margin-bottom: 12px; text-align: center; font-family: 'Orbitron', sans-serif; position: relative; z-index: 1; text-transform: uppercase; }
.diff-sub { font-size: 9px; opacity: 0.65; margin-top: 3px; letter-spacing: 0; font-family: 'Rajdhani', sans-serif; font-weight: 600; }

/* ============ TUTORIAL ============ */
#tutOverlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.72);
    z-index: 5000; display: none; pointer-events: none; transition: opacity 0.3s;
}
#tutBox {
    position: fixed; z-index: 5010; display: none;
    background: linear-gradient(145deg, #0d2137 0%, #0f2519 100%);
    border: 2px solid #4ade80; border-radius: 18px;
    padding: 26px 28px; width: 340px; max-width: calc(100vw - 24px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(74,222,128,0.12);
}
.tut-in { animation: tutPop 0.25s ease; }
.tut-label { font-family: 'Orbitron', sans-serif; font-size: 10px; color: #4ade80; letter-spacing: 3px; margin-bottom: 8px; opacity: 0.65; }
.tut-ttl   { font-family: 'Orbitron', sans-serif; font-size: 14px; color: #e2e8f0; margin-bottom: 10px; line-height: 1.45; }
.tut-txt   { font-size: 13.5px; color: #94a3b8; line-height: 1.7; margin-bottom: 18px; }
.tut-dots  { display: flex; gap: 5px; margin-bottom: 18px; }
.tut-dot   { width: 6px; height: 6px; border-radius: 50%; background: rgba(148,163,184,0.2); transition: all 0.3s; flex-shrink: 0; }
.tut-dot.on { background: #4ade80; width: 20px; border-radius: 3px; }
.tut-row { display: flex; align-items: center; justify-content: space-between; }
.tut-btn-skip { background: transparent; border: 1px solid rgba(239,68,68,0.3); color: #f87171; padding: 7px 13px; border-radius: 8px; cursor: pointer; font-size: 12px; transition: all 0.2s; font-family: 'Rajdhani', sans-serif; }
.tut-btn-skip:hover { background: rgba(239,68,68,0.08); }
.tut-nav { display: flex; gap: 8px; }
.tut-btn-prev { background: transparent; border: 1px solid rgba(148,163,184,0.2); color: #64748b; padding: 7px 13px; border-radius: 8px; cursor: pointer; font-size: 12px; transition: all 0.2s; }
.tut-btn-prev:hover { color: #94a3b8; border-color: rgba(148,163,184,0.4); }
.tut-btn-next {
    background: linear-gradient(135deg, #4ade80, #22c55e); color: #021008;
    border: none; padding: 8px 20px; border-radius: 8px; cursor: pointer;
    font-family: 'Orbitron', sans-serif; font-size: 11px; font-weight: 700;
    letter-spacing: 1px; transition: all 0.2s; white-space: nowrap;
}
.tut-btn-next:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(74,222,128,0.4); }
/* Highlighted element during tutorial */
.tut-hl {
    outline: 3px solid #4ade80 !important; outline-offset: 5px !important;
    border-radius: 10px; position: relative; z-index: 5002 !important;
    pointer-events: all !important; box-shadow: 0 0 24px rgba(74,222,128,0.5) !important;
}

/* ============ DILEMMA POPUP ============ */
#dilemmaOverlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.78); z-index: 1100;
    display: none; backdrop-filter: blur(5px);
    transition: opacity 0.3s;
}
#dilemmaBox {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.85);
    z-index: 1101; background: linear-gradient(155deg, #0d1f35 0%, #1a2e4a 50%, #0d2137 100%);
    border: 3px solid #fbbf24; border-radius: 22px;
    padding: 34px 28px 28px; width: 520px; max-width: 94vw;
    box-shadow: 0 0 60px rgba(251,191,36,0.25), 0 24px 60px rgba(0,0,0,0.8);
    display: none; text-align: center;
    transition: opacity 0.3s, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
#dilemmaBox.dil-in { transform: translate(-50%,-50%) scale(1); }
.dil-step  { font-family:'Orbitron',sans-serif; font-size:10px; color:#fbbf24; letter-spacing:3px; margin-bottom:14px; opacity:0.8; }
.dil-icon  { font-size:56px; margin-bottom:10px; }
.dil-title { font-family:'Orbitron',sans-serif; font-size:18px; color:#fbbf24; font-weight:700; margin-bottom:10px; }
.dil-desc  { font-size:13.5px; color:#94a3b8; line-height:1.75; margin-bottom:24px; }
.dil-choices { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.dil-btn-a, .dil-btn-b {
    padding: 14px 10px; border-radius: 14px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    transition: all 0.18s; border: 2px solid; font-family:'Rajdhani',sans-serif;
}
.dil-btn-a { background:rgba(74,222,128,0.07); border-color:rgba(74,222,128,0.45); }
.dil-btn-a:hover { background:rgba(74,222,128,0.18); border-color:#4ade80; transform:translateY(-3px); box-shadow:0 6px 20px rgba(74,222,128,0.25); }
.dil-btn-b { background:rgba(239,68,68,0.07);  border-color:rgba(239,68,68,0.4); }
.dil-btn-b:hover { background:rgba(239,68,68,0.18); border-color:#f87171; transform:translateY(-3px); box-shadow:0 6px 20px rgba(239,68,68,0.2); }
.dil-ch-icon  { font-size:24px; }
.dil-ch-label { font-size:13px; font-weight:700; color:#e2e8f0; }
.dil-ch-fx    { font-size:11px; color:#64748b; line-height:1.4; }

/* ============ DISASTER BANNER ============ */
#disasterBanner {
    display: none; position: fixed; top: 84px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border: 2px solid #ef4444; border-radius: 16px; padding: 22px 32px;
    text-align: center; z-index: 3001; min-width: 320px; max-width: 90vw;
    box-shadow: 0 0 40px rgba(239,68,68,0.5); animation: disasterIn 0.4s ease;
}
.dis-icon  { font-size: 44px; margin-bottom: 8px; }
.dis-title { font-family: 'Orbitron', sans-serif; font-size: 18px; color: #fca5a5; margin-bottom: 6px; }
.dis-desc  { font-size: 13px; color: #fde68a; margin-bottom: 14px; line-height: 1.5; }
.dis-effects { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.dis-eff { padding: 3px 10px; background: rgba(239,68,68,0.2); border-radius: 20px; font-size: 12px; color: #fca5a5; }
.dis-btn {
    padding: 9px 22px;
    background: linear-gradient(135deg, #ef4444, #dc2626); color: white;
    border: none; border-radius: 8px; cursor: pointer;
    font-family: 'Orbitron', sans-serif; font-size: 11px; letter-spacing: 1px; transition: all 0.2s;
}
.dis-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(239,68,68,0.4); }

/* ============ VICTORY SCREEN ============ */
#victoryScreen {
    position: fixed; inset: 0; z-index: 9500;
    background: linear-gradient(135deg, #020c1b 0%, #0a1a0a 50%, #020c1b 100%);
    display: none; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; overflow: hidden;
}
.v-particles { position: absolute; inset: 0; pointer-events: none; }
.v-logo { font-size: 80px; animation: logoBounce 2s ease-in-out infinite; filter: drop-shadow(0 0 30px rgba(74,222,128,0.6)); position: relative; z-index: 1; }
.victory-title {
    font-family: 'Orbitron', sans-serif; font-size: 48px; font-weight: 900;
    background: linear-gradient(135deg, #4ade80, #22d3ee, #fbbf24);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    margin: 16px 0 8px; position: relative; z-index: 1;
}
.victory-sub    { color: #4ade80; font-size: 14px; letter-spacing: 3px; margin-bottom: 28px; position: relative; z-index: 1; }
.victory-stats  { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; position: relative; z-index: 1; }
.victory-stat   { padding: 14px 20px; background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.25); border-radius: 14px; min-width: 96px; }
.victory-stat-val { font-family: 'Orbitron', sans-serif; font-size: 24px; color: #4ade80; font-weight: 700; }
.victory-stat-lbl { font-size: 11px; color: #64748b; margin-top: 3px; }
.victory-btns { display: flex; gap: 14px; justify-content: center; position: relative; z-index: 1; }
.v-btn-main {
    padding: 13px 36px; font-family: 'Orbitron', sans-serif; font-size: 12px; letter-spacing: 2px;
    background: linear-gradient(135deg, #4ade80, #22c55e); color: #021008;
    border: none; border-radius: 30px; cursor: pointer; transition: all 0.3s;
}
.v-btn-main:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(74,222,128,0.4); }
.v-btn-sec {
    padding: 12px 28px; font-family: 'Orbitron', sans-serif; font-size: 12px; letter-spacing: 2px;
    background: transparent; color: #4ade80;
    border: 2px solid rgba(74,222,128,0.35); border-radius: 30px; cursor: pointer; transition: all 0.3s;
}
.v-btn-sec:hover { background: rgba(74,222,128,0.08); }

/* ============ TREE RUSH MINI-GAME ============ */
#treeRushGame {
    display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: #0d2137; border: 3px solid #4ade80; border-radius: 20px;
    padding: 24px; z-index: 1002; width: 540px; max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.rush-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rush-arena {
    position: relative; height: 230px;
    background: rgba(74,222,128,0.04);
    border: 2px dashed rgba(74,222,128,0.2);
    border-radius: 12px; overflow: hidden; cursor: crosshair; margin: 12px 0;
}
.rush-tree-item {
    position: absolute; font-size: 40px; cursor: pointer; user-select: none;
    animation: treeAppear 0.25s ease; transition: transform 0.1s, opacity 0.2s;
}
.rush-tree-item:hover  { transform: scale(1.15); }
.rush-trash-item {
    position: absolute; font-size: 36px; cursor: pointer; user-select: none;
    animation: treeAppear 0.25s ease; transition: transform 0.1s, opacity 0.2s;
    filter: drop-shadow(0 0 6px rgba(239,68,68,0.7));
}
.rush-trash-item:hover { transform: scale(1.15); filter: drop-shadow(0 0 10px rgba(239,68,68,1)); }
.rush-stats  { display: flex; gap: 14px; margin: 8px 0; }
.rush-stat   { padding: 7px 14px; background: rgba(74,222,128,0.06); border: 1px solid rgba(74,222,128,0.15); border-radius: 8px; font-family: 'Orbitron', sans-serif; font-size: 13px; color: #4ade80; }
.rush-timer-bar  { height: 7px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.rush-timer-fill { height: 100%; background: linear-gradient(90deg, #4ade80, #fbbf24, #ef4444); border-radius: 4px; transition: width 0.5s linear; }

/* ============ SOLAR REPAIR MINI-GAME ============ */
#solarRepairGame {
    display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: #0d2137; border: 3px solid #fbbf24; border-radius: 20px;
    padding: 24px; z-index: 1002; width: 460px; max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.solar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.solar-cell {
    height: 70px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; cursor: pointer; transition: all 0.25s;
    border: 2px solid rgba(74,222,128,0.2); background: rgba(74,222,128,0.04);
}
/* 🥀 Солған өсімдік / Wilted plant */
.solar-cell.broken {
    border-color: rgba(180,83,9,0.6); background: rgba(120,53,15,0.12);
    animation: brokenPulse 1.8s infinite;
    filter: saturate(0.5) brightness(0.85);
}
.solar-cell.broken:hover { filter: saturate(1) brightness(1.05); transform: scale(1.08); }
/* 🌸 Сау өсімдік / Healthy plant */
.solar-cell.fixed {
    border-color: rgba(74,222,128,0.55); background: rgba(74,222,128,0.09);
    cursor: default; box-shadow: 0 0 8px rgba(74,222,128,0.2);
}
.solar-progress      { height: 7px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.solar-progress-fill { height: 100%; background: linear-gradient(90deg, #f97316, #86efac); border-radius: 4px; transition: width 0.35s; }

/* ============ MEMORY CARD GAME ============ */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px; margin: 14px 0;
}
.memory-card { aspect-ratio: 1; perspective: 500px; cursor: pointer; user-select: none; }
.mc-inner {
    position: relative; width: 100%; height: 100%;
    transform-style: preserve-3d; border-radius: 12px;
    transition: transform 0.42s cubic-bezier(0.4,0,0.2,1);
}
.memory-card.flipped .mc-inner,
.memory-card.matched  .mc-inner { transform: rotateY(180deg); }
.mc-cover, .mc-face {
    position: absolute; inset: 0; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; backface-visibility: hidden;
}
.mc-cover {
    background: linear-gradient(135deg, #0f2744 0%, #1e3a5f 100%);
    border: 2px solid rgba(167,139,250,0.25);
    font-size: 22px; color: rgba(167,139,250,0.3);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.3);
}
.mc-cover::after { content: '?'; font-family: 'Orbitron',sans-serif; font-size: 20px; color: rgba(167,139,250,0.25); }
.mc-face {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #1a0a3c 0%, #2d1a54 100%);
    border: 2px solid rgba(167,139,250,0.5);
    font-size: 34px;
}
.memory-card.matched .mc-face {
    border-color: #4ade80;
    background: linear-gradient(135deg, #062317 0%, #0f3d1e 100%);
    box-shadow: 0 0 14px rgba(74,222,128,0.45);
}
.memory-card:not(.flipped):not(.matched):hover .mc-cover {
    border-color: rgba(167,139,250,0.6);
    background: linear-gradient(135deg,#1a3060,#2a4a7f);
}
.mem-stats-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.mem-stat  { padding: 5px 12px; background: rgba(167,139,250,0.06); border: 1px solid rgba(167,139,250,0.2); border-radius: 8px; font-family: 'Orbitron',sans-serif; font-size: 12px; color: #a78bfa; }
.mem-diff-row { display: flex; gap: 8px; margin-bottom: 10px; }
.mem-diff-btn { flex: 1; padding: 6px 4px; border: 1px solid rgba(167,139,250,0.25); background: rgba(167,139,250,0.05); border-radius: 8px; color: #64748b; font-size: 11px; cursor: pointer; transition: all 0.2s; font-family: 'Orbitron',sans-serif; }
.mem-diff-btn:hover, .mem-diff-btn.active { border-color: #a78bfa; background: rgba(167,139,250,0.15); color: #a78bfa; }
