:root {
    --primary: #10B981;
    --secondary: #34D399;
    --accent: #A7F3D0;
    --background: #064E3B;
    --background-dark: #022c22;
    --text-light: #ecfdf5;
    --danger: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --glow: 0 0 10px rgba(16, 185, 129, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: var(--background-dark);
    color: var(--text-light);
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#game-container {
    background: linear-gradient(135deg, var(--background) 0%, var(--background-dark) 100%);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--primary);
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.3);
}

h1 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    text-shadow: var(--glow);
    font-size: 2rem;
    letter-spacing: 2px;
}

#score-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Orbitron', sans-serif;
}

#player-status {
    font-size: 1.2rem;
    color: var(--accent);
}

#turn-indicator {
    font-size: 0.9rem;
    color: var(--secondary);
    min-height: 1.2em;
}

#controls {
    display: flex;
    gap: 10px;
}

.btn {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn:hover {
    background: var(--primary);
    color: var(--background-dark);
    box-shadow: var(--glow);
}

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

.btn.hidden {
    display: none;
}

main {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

canvas {
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background-color: #000;
    cursor: crosshair;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 10;
}

#overlay.active {
    opacity: 1;
    pointer-events: all;
}

.overlay-content {
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#overlay-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    text-shadow: var(--glow);
}

#overlay-message {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-light);
}

#restart-btn {
    font-size: 1.2rem;
    padding: 12px 30px;
}

footer {
    width: 100%;
    border-top: 1px solid rgba(16, 185, 129, 0.3);
    padding-top: 10px;
    font-size: 0.8rem;
    color: var(--secondary);
    display: flex;
    justify-content: center;
}

#high-score-container {
    text-align: center;
}

#high-score-list {
    list-style: none;
    margin-top: 5px;
    display: flex;
    gap: 15px;
}

#high-score-list li {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
}
