:root {
    --game-bg: #0f172a;
    --game-card: rgba(30, 41, 59, 0.7);
    --neon-cyan: #38bdf8;
    --neon-magenta: #f472b6;
    --neon-lime: #4ade80;
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.6);
}

/* Header & Intro */
.game-header-area {
    text-align: center;
    margin: 40px 0 60px;
    background: rgba(255, 255, 255, 0.9);
    padding: 40px 20px;
    border-radius: 24px;
    color: #000000;
}

.game-header-area h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
    color: #000000;
}

.game-header-area h1 span {
    color: var(--neon-cyan);
    text-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
}

.game-subtitle {
    font-size: clamp(1rem, 4vw, 1.3rem);
    opacity: 0.8;
}

/* Main Layout */
.game-layout-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 40px;
    margin-bottom: 60px;
    color: var(--text-main);
}

/* Sidebar & Clues */
.clues-container {
    background: var(--game-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 28px;
}

.game-meta-card {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.game-id {
    background: var(--neon-cyan);
    color: var(--game-bg);
    padding: 6px 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
}

.game-timer {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Courier New', Courier, monospace;
    color: var(--neon-cyan);
    margin-top: 15px;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.clues-container h3 {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.clues-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clue-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 18px 22px;
    border-radius: 18px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-main);
    opacity: 0.6;
}

.clue-item.active {
    opacity: 1;
    border-color: var(--neon-magenta);
    background: rgba(244, 114, 182, 0.15);
    box-shadow: 0 0 20px rgba(244, 114, 182, 0.2);
    transform: translateX(10px);
    font-weight: 700;
}

.clue-item.solved {
    opacity: 0.9;
    border-color: var(--neon-lime);
    color: var(--neon-lime);
    background: rgba(74, 222, 128, 0.1);
}

/* Game Canvas */
.game-main-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.ladder-canvas {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 450px;
    margin-bottom: 50px;
}

.ladder-node {
    background: var(--game-card);
    border: 2px solid var(--glass-border);
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 6px;
    transition: all 0.3s ease;
}

.ladder-node.start-end {
    border-color: var(--neon-cyan);
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.ladder-node.active {
    border-color: var(--neon-magenta);
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    transform: scale(1.04);
    box-shadow: 0 0 30px rgba(244, 114, 182, 0.3);
    text-shadow: 0 0 10px rgba(244, 114, 182, 0.5);
}

.ladder-node.correct {
    border-color: var(--neon-lime);
    color: var(--neon-lime);
    background: rgba(15, 23, 42, 0.8);
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

/* Controls */
.game-controls {
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#current-clue-label {
    font-size: 1.2rem;
    color: var(--neon-magenta);
    font-weight: 700;
    text-align: center;
    min-height: 1.6em;
    text-shadow: 0 0 10px rgba(244, 114, 182, 0.2);
}

.input-wrapper {
    display: flex;
    gap: 15px;
}

#word-input {
    flex: 1;
    background: #1e293b;
    border: 2px solid var(--glass-border);
    padding: 20px 25px;
    border-radius: 18px;
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    outline: none;
    width: 100%;
}

#word-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

#btn-submit-word {
    background: var(--neon-cyan);
    color: var(--game-bg);
    border: none;
    padding: 0 35px;
    border-radius: 18px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

#btn-submit-word:hover {
    background: #22d3ee;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(56, 189, 248, 0.4);
}

.help-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.btn-help {
    background: none;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-help span {
    font-weight: 800;
    text-decoration: underline;
}

.btn-help:hover {
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
}

/* Educational Sections */
.game-info-sections {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 80px;
    color: var(--text-main);
    padding: 0 20px;
}

.info-card {
    background: var(--game-card);
    border: 1px solid var(--glass-border);
    padding: clamp(20px, 5vw, 45px);
    border-radius: 35px;
}

.info-card h2, .info-card h3 {
    margin-bottom: 20px;
    color: var(--neon-cyan);
    font-size: clamp(1.5rem, 5vw, 2rem);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.steps-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.steps-list li {
    font-size: 1.1rem;
    line-height: 1.6;
}

.steps-list li strong {
    color: var(--neon-cyan);
    display: block;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.cta-card {
    text-align: center;
    background: #ffffff;
    border-color: var(--neon-cyan);
    color: #000000;
}

.cta-card p {
    color: #000000;
    font-weight: 500;
}

.btn-primary {
    display: inline-block;
    background: var(--neon-cyan);
    color: var(--game-bg);
    padding: 18px 40px;
    border-radius: 15px;
    font-weight: 800;
    text-decoration: none;
    margin-top: 25px;
    font-size: 1.2rem;
    transition: 0.3s;
}

/* Archive Dashboard */
.archive-dashboard {
    padding: 40px 20px;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.stat-card {
    background: var(--game-card);
    padding: 30px 20px;
    border-radius: 28px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.stat-value {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1;
}

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

.archive-card {
    background: var(--game-card);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    color: white;
    transition: 0.3s;
}

/* RESPONSIVE & ADSENSE OPTIMIZATION */
@media (max-width: 1000px) {
    .game-layout-grid {
        grid-template-columns: 1fr;
    }
    .game-sidebar {
        order: 2;
    }
    .game-main-area {
        order: 1;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }
    .container {
        padding: 0;
        max-width: 100%;
    }
    .clues-container, .info-card, .stat-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 25px 20px;
    }
    .ladder-node {
        height: 60px;
        font-size: 1.4rem;
        letter-spacing: 4px;
        border-radius: 10px;
    }
    .input-wrapper {
        flex-direction: column;
    }
    #btn-submit-word {
        padding: 18px;
    }
    .game-timer {
        font-size: 2.2rem;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #1e293b;
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--neon-cyan);
    width: 100%;
}

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