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

body {
    overflow: hidden;
    background: #1a1a2e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

#ui {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

#stats {
    display: flex;
    gap: 24px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 20px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

#stats span {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#red-count {
    color: #ff6b6b;
}

#gray-count {
    color: #aaa;
}

#money-display {
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
}

#buy-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.85);
    padding: 12px 20px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.buy-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title {
    color: #888;
    font-size: 12px;
    margin-right: 4px;
}

.buy-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}

.buy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.buy-btn.active {
    background: rgba(78, 205, 196, 0.3);
    border-color: #4ecdc4;
}

.buy-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 24px;
}

.btn-cost {
    color: #ffd700;
    font-size: 11px;
    font-weight: bold;
}

#build-info {
    color: #888;
    font-size: 12px;
    align-self: center;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

#message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    display: none;
    text-align: center;
    pointer-events: none;
    z-index: 20;
}

#message.win {
    display: block;
    color: #4ecdc4;
}

#message.lose {
    display: block;
    color: #ff6b6b;
}

#selection-box {
    position: fixed;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    display: none;
    z-index: 5;
}

#mode-selector {
    display: flex;
    align-items: center;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: 5px;
}

#mode-select {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 5px 10px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

#mode-select:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

#mode-select option {
    background: #1a1a2e;
    color: #fff;
}

#lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    color: #888;
    font-size: 12px;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background: rgba(78, 205, 196, 0.3);
    border-color: #4ecdc4;
    color: #fff;
}


