:root {
    --bg: #0a0a0f;
    --panel: #12121a;
    --gold: #c9a050;
    --gold-dim: #7a5e2e;
    --text: #c0b8a8;
    --text-bright: #e8e0d0;
    --red: #c0392b;
    --blue: #4a80c0;
    --border: #2a2520;
    --font-main: 'Georgia', 'Times New Roman', serif;
    --font-ui: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #06060a;
    background-image: radial-gradient(ellipse at center, #111118 0%, #050508 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: var(--font-ui);
    color: var(--text);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 10px;
    overflow-x: hidden;
}

.game-wrapper {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow:
        0 0 80px rgba(0, 0, 0, 0.8),
        0 0 160px rgba(120, 70, 20, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.015);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 960px;
    width: 100%;
}

.title-area {
    text-align: center;
}

.game-title {
    font-family: var(--font-main);
    font-size: 1.7em;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 4px;
    text-shadow: 0 0 24px rgba(180, 130, 50, 0.5), 0 2px 6px rgba(0, 0, 0, 0.7);
    text-transform: uppercase;
}

.game-subtitle {
    font-family: var(--font-main);
    font-size: 0.65em;
    color: var(--gold-dim);
    letter-spacing: 6px;
    margin-top: -2px;
}

.canvas-container {
    position: relative;
    border: 2px solid #1f1f28;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
    background: #000;
    cursor: crosshair;
    width: 100%;
    max-width: 920px;
}

canvas {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: auto;
}

.info-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 920px;
    font-size: 0.7em;
    color: #908878;
    letter-spacing: 1px;
}

.info-bar span {
    background: var(--panel);
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.info-bar .key {
    color: #d4b860;
    font-weight: bold;
}

.info-bar .key.alt {
    color: #b89050;
}

.btn-restart {
    padding: 10px 28px;
    font-family: var(--font-main);
    font-size: 0.85em;
    letter-spacing: 3px;
    border: 2px solid #5a8040;
    border-radius: 6px;
    cursor: pointer;
    background: #1a1a1a;
    color: #a0d080;
    text-transform: uppercase;
    transition: all 0.25s ease;
    display: none;
    animation: pulse-btn 2.2s infinite;
}

.btn-restart:hover {
    border-color: #80b860;
    color: #c0f0a0;
    box-shadow: 0 0 28px rgba(100, 160, 60, 0.35);
    transform: translateY(-2px);
}

@keyframes pulse-btn {
    0%,
    100% {
        box-shadow: 0 0 10px rgba(100, 160, 60, 0.15);
    }
    50% {
        box-shadow: 0 0 30px rgba(100, 160, 60, 0.4);
    }
}

@media (max-width: 700px) {
    .game-title {
        font-size: 1.2em;
        letter-spacing: 2px;
    }
    .game-subtitle {
        font-size: 0.55em;
        letter-spacing: 3px;
    }
    .info-bar {
        font-size: 0.6em;
        gap: 6px;
    }
    .info-bar span {
        padding: 4px 8px;
    }
    .btn-restart {
        padding: 8px 18px;
        font-size: 0.7em;
    }
}