/* Tower Defense Styles */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.game-header {
    text-align: center;
    margin-bottom: 16px;
}

.game-header h1 {
    margin: 0 0 12px 0;
    color: #1a365d;
    font-size: 2em;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat {
    background: #f0f4f8;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1em;
}

.stat strong {
    color: #1a365d;
}

.game-layout {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: flex-start;
}

#gameCanvas {
    border: 3px solid #1a365d;
    border-radius: 8px;
    cursor: crosshair;
    background: #2d5a27;
    max-width: 100%;
}

.sidebar {
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar h3 {
    margin: 0 0 8px 0;
    color: #1a365d;
    font-size: 1em;
}

.tower-selector {
    background: #f0f4f8;
    padding: 12px;
    border-radius: 8px;
}

.tower-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 6px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    background: #fff;
    transition: all 0.2s;
}

.tower-btn:hover {
    border-color: #4299e1;
}

.tower-btn.active {
    border-color: #1a365d;
    background: #ebf8ff;
}

.tower-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.basic-icon { background: #4299e1; }
.sniper-icon { background: #e53e3e; }
.splash-icon { background: #ed8936; }
.ice-icon { background: #63b3ed; }

.tower-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.9em;
}

.tower-cost {
    color: #38a169;
    font-weight: 600;
    font-size: 0.9em;
}

.wave-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: opacity 0.2s;
}

.btn-primary { background: #1a365d; color: #fff; }
.btn-secondary { background: #4299e1; color: #fff; }
.btn-danger { background: #e53e3e; color: #fff; }
.btn-primary:hover, .btn-secondary:hover, .btn-danger:hover { opacity: 0.85; }
.btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }

.tower-info {
    background: #f0f4f8;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85em;
}

.tower-info p {
    margin: 4px 0;
    color: #4a5568;
}

.game-info {
    background: #f0f4f8;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85em;
}

.game-info ul {
    margin: 0;
    padding-left: 18px;
}

.game-info li {
    margin-bottom: 4px;
    color: #4a5568;
}

.game-over-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    min-width: 300px;
}

.modal-content h2 {
    color: #e53e3e;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 1.2em;
    margin: 8px 0;
}

@media (max-width: 1100px) {
    .game-layout {
        flex-direction: column;
        align-items: center;
    }
    .sidebar {
        width: 100%;
        max-width: 800px;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .tower-selector, .wave-controls, .tower-info, .game-info {
        flex: 1;
        min-width: 200px;
    }
}
