/* --- GAMEPLAY TERMINAL SHELL --- */
.game-shell {
    max-width: 800px;
    margin: 0 auto;
    background: #03050c;
    border: 2px solid var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(20px);
}
.game-shell::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}
.game-shell__header {
    background: rgba(0, 240, 255, 0.05);
    border-bottom: 2px solid var(--neon-cyan);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.game-shell__title {
    font-family: var(--font-cyber);
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.game-shell__title::before {
    content: '::';
    color: var(--neon-cyan);
}
.game-shell__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.game-shell__timer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--neon-cyan);
}
.game-shell__timer-bar {
    width: 120px;
    height: 6px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}
.game-shell__timer-fill {
    width: 100%;
    height: 100%;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px var(--neon-cyan);
    transition: width 0.1s linear, background var(--transition-fast);
}
.game-shell__timer-fill.warning {
    background: var(--neon-orange);
    box-shadow: 0 0 8px var(--neon-orange);
}
.game-shell__timer-fill.danger {
    background: var(--neon-magenta);
    box-shadow: 0 0 8px var(--neon-magenta);
}

.game-shell__body {
    min-height: 380px;
    padding: 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* --- GAME 1: BREACH PROTOCOL (MEMORY MATRIX) --- */
.matrix-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}
.matrix-node {
    aspect-ratio: 1;
    background: rgba(13, 20, 47, 0.4);
    border: 1.5px solid rgba(0, 240, 255, 0.2);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.3);
}
.matrix-node:hover {
    border-color: rgba(0, 240, 255, 0.6);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}
.matrix-node.active {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--neon-cyan);
    color: #fff;
    box-shadow: var(--shadow-cyan);
}
.matrix-node.success {
    background: rgba(57, 255, 20, 0.2);
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: var(--shadow-green);
}
.matrix-node.error {
    background: rgba(255, 0, 85, 0.25);
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    box-shadow: var(--shadow-magenta);
    animation: shakeNode 0.3s ease;
}

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

/* --- GAME 2: SERVER ROUTER (GRID CONNECTOR) --- */
.router-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.router-board {
    position: relative;
    background: rgba(6, 8, 19, 0.7);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: var(--border-radius-md);
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1.1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 8px;
    padding: 16px;
    z-index: 1;
}
.router-tile {
    background: rgba(13, 20, 47, 0.4);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.router-tile:hover:not(.blocked):not(.start):not(.end) {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
}
.router-tile.start {
    background: rgba(57, 255, 20, 0.1);
    border-color: var(--neon-green);
    color: var(--neon-green);
    cursor: default;
}
.router-tile.end {
    background: rgba(255, 0, 85, 0.1);
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    cursor: default;
}
.router-tile.blocked {
    background: #0f121d;
    border-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
}
.router-tile.connected {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}
.router-tile.active-connection {
    background: rgba(57, 255, 20, 0.2);
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}
.router-tile-inner {
    font-size: 1.1rem;
    pointer-events: none;
}
.router-instructions {
    font-family: var(--font-mono);
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 14px;
    text-align: center;
}

/* --- GAME 3: CIPHER CRACKER (DECRYPTOR) --- */
.cipher-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.cipher-screen {
    background: #04060f;
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    font-family: var(--font-mono);
    text-align: center;
}
.cipher-string {
    font-size: 1.3rem;
    color: var(--neon-magenta);
    letter-spacing: 0.15em;
    margin-bottom: 8px;
    word-break: break-all;
    text-shadow: 0 0 8px rgba(255, 0, 85, 0.3);
}
.cipher-subtitle {
    font-size: 0.75rem;
    color: #64748b;
}
.cipher-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.cipher-option {
    background: var(--bg-card);
    border: 1px solid var(--border-cyber);
    border-radius: var(--border-radius-sm);
    padding: 16px 8px;
    font-family: var(--font-mono);
    color: #fff;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-fast);
}
.cipher-option:hover {
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
    background: rgba(0, 240, 255, 0.03);
}
.cipher-option.success {
    background: rgba(57, 255, 20, 0.15);
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: var(--shadow-green);
}
.cipher-option.error {
    background: rgba(255, 0, 85, 0.15);
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    box-shadow: var(--shadow-magenta);
}

/* --- GAME 4: PORT SCAN QUIZ (CRT MONITOR) --- */
.quiz-container {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: var(--font-mono);
}
.quiz-question-box {
    background: #04060f;
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    color: var(--neon-green);
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 100px;
    position: relative;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.quiz-option {
    background: rgba(13, 20, 47, 0.4);
    border: 1px solid var(--border-cyber);
    border-radius: var(--border-radius-sm);
    padding: 14px 20px;
    color: #94a3b8;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
}
.quiz-option:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.04);
    color: #fff;
}
.quiz-option-indicator {
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(0, 240, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.quiz-option:hover .quiz-option-indicator {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 6px var(--neon-cyan);
}
.quiz-option.selected {
    border-color: var(--neon-cyan);
    color: #fff;
    background: rgba(0, 240, 255, 0.05);
}
.quiz-option.selected .quiz-option-indicator {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
}
.quiz-option.success {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(57, 255, 20, 0.08);
}
.quiz-option.success .quiz-option-indicator {
    background: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: var(--shadow-green);
}
.quiz-option.error {
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    background: rgba(255, 0, 85, 0.08);
}
.quiz-option.error .quiz-option-indicator {
    background: var(--neon-magenta);
    border-color: var(--neon-magenta);
    box-shadow: var(--shadow-magenta);
}

/* --- OVERLAY MODALS & WIN STATES --- */
.hologram-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(3, 5, 12, 0.95);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--transition-smooth);
}
.hologram-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.hologram-title {
    font-family: var(--font-cyber);
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: 0.1em;
}
.hologram-subtitle {
    font-family: var(--font-mono);
    color: #94a3b8;
    margin-bottom: 30px;
    max-width: 440px;
}
.xp-animation-box {
    width: 100%;
    max-width: 320px;
    margin-bottom: 40px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: var(--border-radius-md);
}
.xp-animation-label {
    font-family: var(--font-cyber);
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.xp-animation-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.xp-animation-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    box-shadow: 0 0 10px var(--neon-cyan);
    transition: width 1.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}
.hologram-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}
