/* ===== CSS VARIABLES & RESET ===== */
:root {
    --primary: #00ff88;
    --primary-dim: #00cc6a;
    --primary-glow: rgba(0, 255, 136, 0.4);
    --danger: #ff3366;
    --danger-glow: rgba(255, 51, 102, 0.4);
    --warning: #ffaa00;
    --bg-dark: #050505;
    --bg-card: rgba(10, 15, 20, 0.85);
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(0, 255, 136, 0.2);
    --text-primary: #e0ffe8;
    --text-secondary: #88bb99;
    --font-mono: 'Courier New', monospace;
    --font-display: 'Courier New', monospace;
    --radius: 12px;
    --radius-sm: 6px;
}

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

html, body {
    height: 100%;
    font-family: var(--font-mono);
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    line-height: 1.6;
}

/* ===== LAYER SYSTEM - FIXAT ===== */
.layer {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.layer.active {
    display: flex;
}

/* INTRO - z-index mai mare */
#intro {
    z-index: 100;
    background: var(--bg-dark);
}

/* START - z-index mediu */
#startLayer {
    z-index: 50;
}

/* GAME - z-index mic */
#game {
    z-index: 10;
    padding: 20px;
    display: none !important;
    flex-direction: column;
    gap: 10px;
    /* FIX: înălțime fixă relativă la viewport */
    height: 100vh;
    max-height: 100vh;
    overflow: hidden; /* FIX: ascunde overflow, gestionăm în interior */
}

#game.active {
    display: flex !important;
}

/* ===== MATRIX BACKGROUND ===== */
#matrix {
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 0.6;
    display: none;
}

#matrix.active {
    display: block;
}

/* ===== SCANLINES & VIGNETTE ===== */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.3) 2px,
        rgba(0, 0, 0, 0.3) 4px
    );
    pointer-events: none;
    z-index: 5;
    animation: scanline 8s linear infinite;
    display: none;
}

.scanlines.active {
    display: block;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

.vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 4;
    display: none;
}

.vignette.active {
    display: block;
}

/* ===== INTRO SEQUENCE ===== */
.boot-sequence {
    position: absolute;
    top: 20%;
    left: 10%;
    font-size: 14px;
    color: var(--primary);
    opacity: 0.6;
}

.boot-line {
    margin: 8px 0;
    animation: bootFade 0.5s ease-in;
}

@keyframes bootFade {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 0.6; transform: translateX(0); }
}

.glitch-text {
    font-family: var(--font-display);
    font-size: clamp(24px, 5vw, 48px);
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    position: relative;
    animation: glitch-skew 1s infinite;
    text-shadow: 
        0 0 10px var(--primary-glow),
        0 0 40px var(--primary-glow);
    display: none;
}

.glitch-text.visible {
    display: block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
    color: #ff00ff;
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch-anim-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(-2px, 0); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(2px, 2px); }
}

@keyframes glitch-anim-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(30% 0 40% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(10% 0 70% 0); transform: translate(2px, 0); }
    80% { clip-path: inset(40% 0 20% 0); transform: translate(-2px, -2px); }
}

@keyframes glitch-skew {
    0%, 100% { transform: skew(0deg); }
    20% { transform: skew(-2deg); }
    40% { transform: skew(2deg); }
    60% { transform: skew(-1deg); }
    80% { transform: skew(1deg); }
}

/* ===== HOLO BUTTON (START) - FIXAT ===== */
/* .holo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 51;
} */

.holo-container {
    position: fixed; /* FIXAT */
    inset: 0;        /* FIXAT: acoperă tot ecranul */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 51;
    pointer-events: none; /* FIXAT: permite click prin container */
}

.holo-ring {
    position: absolute;
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: holo-pulse 2s ease-out infinite;
    pointer-events: none;
}

.holo-ring:nth-child(1) { width: 200px; height: 200px; animation-delay: 0s; }
.holo-ring:nth-child(2) { width: 240px; height: 240px; animation-delay: 0.5s; }
.holo-ring:nth-child(3) { width: 280px; height: 280px; animation-delay: 1s; }

@keyframes holo-pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* .holo-btn {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    background: 
        radial-gradient(circle at 30% 30%, rgba(0,255,136,0.2) 0%, transparent 50%),
        linear-gradient(135deg, rgba(0,255,136,0.1) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    color: var(--primary);
    font-family: var(--font-display);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 
        0 0 30px var(--primary-glow),
        inset 0 0 30px rgba(0,255,136,0.1);
    transition: all 0.3s ease;
    z-index: 52;
    pointer-events: auto;
} */

.holo-btn {
    position: fixed; /* FIXAT: fixed în loc de relative */
    left: 50%;       /* FIXAT: centrat */
    top: 50%;        /* FIXAT: centrat */
    transform: translate(-50%, -50%); /* FIXAT: centrat perfect */
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    background: 
        radial-gradient(circle at 30% 30%, rgba(0,255,136,0.2) 0%, transparent 50%),
        linear-gradient(135deg, rgba(0,255,136,0.1) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    color: var(--primary);
    font-family: var(--font-display);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 
        0 0 30px var(--primary-glow),
        inset 0 0 30px rgba(0,255,136,0.1);
    transition: all 0.3s ease;
    z-index: 52;
    pointer-events: auto;
    will-change: transform; /* FIXAT: optimizare performanță */
}

.holo-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 50px var(--primary-glow),
        inset 0 0 40px rgba(0,255,136,0.2);
}

.holo-btn:active {
    transform: scale(0.95);
}

.btn-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    pointer-events: none;
}

.btn-sub {
    font-size: 10px;
    opacity: 0.7;
    letter-spacing: 1px;
    pointer-events: none;
}

.security-warning {
    position: absolute;
    bottom: 10%;
    font-size: 12px;
    color: var(--danger);
    letter-spacing: 2px;
    opacity: 0.6;
    z-index: 51;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== GAME HUD ===== */
.hud-header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.hud-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 3px;
    text-shadow: 0 0 20px var(--primary-glow);
}

.logo-sub {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.hud-stats {
    display: flex;
    gap: 30px;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

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

.stat-info {
    display: flex;
    flex-direction: column;
}

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

.stat-value {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* ===== GAME CONTAINER ===== */
.game-container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    /* FIX: înălțimea trebuie să țină cont de header și padding */
    height: calc(100vh - 140px); /* 140px = header ~100px + padding-uri */
    min-height: 400px; /* FIX: nu permite înălțimi negative */
    overflow: hidden; /* FIX: gestionăm scroll în interior */
}

/* ===== GLASS CARDS ===== */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: linear-gradient(90deg, transparent 0%, rgba(0,255,136,0.05) 50%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.header-label {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--primary);
    opacity: 0.8;
}

/* ===== STORY CARD ===== */
.story-card {
    flex: 1;
}

.story-content {
    flex: 1;
    padding: 20px;             /* FIX: padding mai mic */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;          /* FIX: scroll dacă e prea mult text */
    position: relative;        /* FIX: pentru poziționarea ::before */
}

.story-text {
    font-size: 16px;           /* FIX: mai mic */
    line-height: 1.6;          /* FIX: compact */
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0,255,136,0.1);
    white-space: normal;       /* FIX: permite împărțirea pe linii */
    word-wrap: break-word;     /* FIX: rupe cuvintele lungi */
    overflow-wrap: break-word; /* FIX: alternativă pentru word-wrap */
    max-width: 100%;           /* FIX: nu depășește containerul */
}

.story-text::before {
    content: '>';
    position: absolute;
    left: -20px;               /* FIX: mai aproape */
    color: var(--primary);
    opacity: 0.5;
}

/* Typing animation */
/* .typing {
    overflow: hidden;
    border-right: 2px solid var(--primary);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
} */

.typing {
    border-right: 2px solid var(--primary);
    animation: blink-caret 0.75s step-end infinite;
}


@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary) }
}

/* ===== OPTIONS ===== */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.option-btn {
    position: relative;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(0,255,136,0.1) 0%, transparent 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.option-btn:hover {
    background: linear-gradient(135deg, rgba(0,255,136,0.2) 0%, transparent 100%);
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 5px 20px var(--primary-glow);
}

.option-btn:hover::before {
    opacity: 1;
}

/* ===== PUZZLE AREA ===== */
.puzzle-area {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.puzzle-area.hidden {
    display: none;
}

/* ===== CHAT CARD ===== */
.chat-card {
    max-height: 100%;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0,0,0,0.3);
}

.chat-welcome {
    text-align: center;
    margin-bottom: 20px;
}

.system-msg {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    opacity: 0.6;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
    animation: messageSlide 0.3s ease;
}

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

.msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(0,255,136,0.2) 0%, rgba(0,255,136,0.05) 100%);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.msg-ai {
    align-self: flex-start;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--glass);
}

/* ===== INPUTS & BUTTONS ===== */
.input-group {
    display: flex;
    gap: 10px;
}

.cyber-input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.cyber-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.cyber-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.cyber-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.cyber-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.cyber-btn.secondary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.cyber-btn.secondary:hover {
    background: rgba(0,255,136,0.1);
}

.cyber-btn.icon-btn {
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== DANGER ZONE ===== */
/* .danger-zone {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
} */

.danger-zone {
    position: relative;     /* FIX: relativ în loc de fixed */
    bottom: auto;           /* FIX: elimină bottom fixed */
    left: auto;             /* FIX: elimină left fixed */
    transform: none;        /* FIX: elimină transform */
    z-index: 1;             /* FIX: z-index mic */
    opacity: 0.4;           /* FIX: aproape invizibil */
    transition: opacity 0.3s;
    margin-top: 20px;       /* FIX: spațiu deasupra */
    align-self: center;       /* FIX: centrat în container */
}

.danger-zone:hover {
    opacity: 1;
}

.danger-zone:hover {
    opacity: 1;             /* FIX: vizibil doar la hover */
}

.danger-btn {
    position: relative;
    padding: 20px 40px;
    background: 
        linear-gradient(135deg, rgba(255,51,102,0.1) 0%, transparent 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255,51,102,0.05) 10px,
            rgba(255,51,102,0.05) 20px
        );
    border: 2px solid var(--danger);
    border-radius: var(--radius);
    color: var(--danger);
    font-family: var(--font-display);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 0 30px var(--danger-glow);
    
}

.danger-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,51,102,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.danger-btn:hover::before {
    transform: translateX(100%);
}

.danger-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px var(--danger-glow);
}

.danger-btn:active {
    transform: scale(0.95);
}

.danger-text {
    display: block;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 4px;
    animation: danger-pulse 2s infinite;
}

.danger-sub {
    display: block;
    font-size: 10px;
    opacity: 0.7;
    letter-spacing: 2px;
    margin-top: 4px;
}

@keyframes danger-pulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px var(--danger-glow); }
    50% { opacity: 0.6; text-shadow: 0 0 20px var(--danger-glow); }
}

/* ===== VOUCHER MODAL ===== */
.voucher-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFade 0.5s ease;
}

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

.voucher-card {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 3px solid var(--primary);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 60px var(--primary-glow);
    animation: voucherFloat 3s ease-in-out infinite;
}

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

.voucher-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,255,136,0.03) 10px,
        rgba(0,255,136,0.03) 20px
    );
    animation: slide 20s linear infinite;
}

.voucher-icon {
    font-size: 64px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px var(--primary-glow));
    position: relative;
    z-index: 1;
}

.voucher-title {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px var(--primary-glow);
}

.voucher-desc {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.voucher-code-box {
    background: rgba(0,0,0,0.5);
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.voucher-label {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.voucher-code {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--primary);
    letter-spacing: 4px;
    font-weight: 700;
    text-shadow: 0 0 10px var(--primary-glow);
}

.voucher-meta {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    position: relative;
    z-index: 1;
}

.voucher-validity {
    font-size: 11px;
    color: #666;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.restart-btn {
    margin-top: 30px;
    padding: 16px 40px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px var(--primary-glow);
}

/* ===== PUNISHMENT OVERLAY ===== */
.punishment-overlay {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,51,102,0.95);
    color: white;
    padding: 24px 48px;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    z-index: 10000;
    border: 2px solid var(--danger);
    box-shadow: 0 0 40px var(--danger-glow);
    animation: punishmentPulse 0.5s ease-in-out;
    text-align: center;
}

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
    opacity: 0.5;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .game-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        height: calc(100vh - 180px);
    }
    
    .chat-card {
        max-height: 300px;
    }
    
    .hud-stats {
        gap: 15px;
    }
    
    .stat-box {
        padding: 8px 15px;
    }
    
    .stat-info {
        display: none;
    }
}

@media (max-width: 600px) {
    .hud-header {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .hud-brand {
        justify-content: center;
    }
    
    .story-content {
        padding: 20px;
    }
    
    .story-text {
        font-size: 16px;
    }
    
    .options-grid {
        padding: 15px;
    }
    
    .option-btn {
        padding: 14px 18px;
        font-size: 13px;
    }
    
    .danger-btn {
        padding: 16px 30px;
    }
    
    .voucher-card {
        padding: 30px 20px;
    }
    
    .voucher-title {
        font-size: 22px;
    }
    
    .voucher-code {
        font-size: 18px;
    }
}

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

.glitch-active {
    animation: glitch-shake 0.3s infinite;
}

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

.invert-colors {
    filter: invert(1) contrast(3) hue-rotate(180deg) !important;
}

/* ===== SELECTION ===== */
::selection {
    background: var(--primary);
    color: #000;
}

/* FIX: Previne dispariția butonului */
#startBtn {
    min-width: 160px;
    min-height: 160px;
    max-width: 160px;
    max-height: 160px;
}

/* FIX: Asigură că butonul e vizibil mereu */
#startLayer.active #startBtn {
    opacity: 1;
    visibility: visible;
}


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


#hackText {
    transition: opacity 1.5s ease-out; /* în loc de 0.5s sau ce ai acum */
}

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