* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0d1b0f;
    color: #e8f5e9;
    font-family: 'Segoe UI', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

h1 {
    letter-spacing: 2px;
    color: #4caf50;
}

/* MENU */
.difficulty-buttons {
    display: flex;
    gap: 16px;
}

.difficulty-btn {
    background: #163b1a;
    border: 2px solid #4caf50;
    color: #e8f5e9;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.difficulty-btn span {
    font-size: 12px;
    font-weight: normal;
    color: #a5d6a7;
}

.difficulty-btn:hover {
    background: #1f5a26;
}

#continue-btn {
    background: #f1c40f;
    border: none;
    color: #201400;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
}

/* HUD */
#hud {
    display: flex;
    justify-content: space-between;
    width: 800px;
    background: #102712;
    border: 2px solid #4caf50;
    border-radius: 6px 6px 0 0;
    padding: 8px 16px;
    font-weight: bold;
    font-size: 14px;
}

/* GAME AREA */
#game-area {
    position: relative;
}

canvas {
    background: #1b2e1b;
    display: block;
    border-left: 2px solid #4caf50;
    border-right: 2px solid #4caf50;
    cursor: crosshair;
}

.banner {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(16, 39, 18, 0.95);
    border: 2px solid #f1c40f;
    color: #f1c40f;
    font-weight: bold;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.banner.visible {
    opacity: 1;
}

.speed-controls {
    display: flex;
    gap: 4px;
}

.speed-btn {
    background: #163b1a;
    border: 1px solid #4caf50;
    color: #e8f5e9;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.speed-btn.selected {
    background: #4caf50;
    color: #0d1b0f;
}

#restart-round-btn {
    background: #922b21;
    border: 1px solid #e74c3c;
    color: #f5e8e8;
    font-weight: bold;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* TOWER BAR */
#tower-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 800px;
    background: #102712;
    border: 2px solid #4caf50;
    border-radius: 0 0 6px 6px;
    padding: 10px 16px;
}

.tower-btn {
    background: #163b1a;
    border: 2px solid #4caf50;
    color: #e8f5e9;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 90px;
}

.tower-btn.selected {
    background: #2e7d32;
    border-color: #a5d6a7;
}

.tower-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tower-btn-cost {
    font-size: 11px;
    color: #a5d6a7;
}

#start-wave-btn {
    margin-left: auto;
    background: #ff9800;
    border: none;
    color: #201400;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
}

#start-wave-btn:disabled {
    background: #6d4c1f;
    color: #b8a98a;
    cursor: not-allowed;
}

#auto-wave-btn {
    background: #163b1a;
    border: 2px solid #4caf50;
    color: #e8f5e9;
    font-weight: bold;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
}

#auto-wave-btn.selected {
    background: #4caf50;
    color: #0d1b0f;
}

/* TOWER INFO PANEL */
.panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(16, 39, 18, 0.95);
    border: 2px solid #4caf50;
    border-radius: 6px;
    padding: 12px 16px;
    min-width: 180px;
}

.panel h3 {
    margin: 0 0 6px 0;
    color: #4caf50;
}

.panel-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.panel-actions button {
    flex: 1;
    background: #163b1a;
    border: 1px solid #4caf50;
    color: #e8f5e9;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.panel-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* GAME OVER / VICTORY */
#game-over-screen h1 {
    color: #e74c3c;
}

#victory-screen h1 {
    color: #f1c40f;
}
