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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 900px;
    width: 100%;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
}

.title {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-stats {
    display: flex;
    gap: 20px;
    font-size: 16px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    color: #ffd700;
    font-weight: bold;
}

.castle-hp-bar {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    margin-bottom: 15px;
}

#gameCanvas {
    display: block;
    background: #1a1a2e;
    border: 3px solid #4a90e2;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.3);
    cursor: crosshair;
}

.tower-menu {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
}

.tower-btn {
    flex: 1;
    max-width: 150px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.tower-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.tower-btn:active {
    transform: translateY(0);
}

.tower-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tower-btn.selected {
    border: 3px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.tower-name {
    display: block;
    font-size: 18px;
    margin-bottom: 5px;
}

.tower-cost {
    display: block;
    font-size: 12px;
    color: #ffd700;
}

.game-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
}

.game-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-message.hidden {
    display: none;
}

.message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 60px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

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

#messageTitle {
    font-size: 36px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#messageText {
    font-size: 18px;
    color: #f0f0f0;
}
