/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0b0c1a, #1a1e3a);
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Экран меню */
#menuScreen {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
    max-width: 700px;
    width: 90%;
}

h1 {
    font-size: 3rem;
    text-shadow: 0 0 20px #ffaa00, 0 0 40px #ff6600;
    margin-bottom: 30px;
}

.characters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.char-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px 25px;
    font-size: 1.3rem;
    border-radius: 60px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
    letter-spacing: 1px;
    flex: 0 1 auto;
}

.char-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffcc00;
    box-shadow: 0 0 30px #ffcc00;
}

.hint {
    margin-top: 20px;
    color: #aaa;
    font-style: italic;
}

/* Экран боя */
#gameScreen {
    width: 90%;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 40px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

.battlefield {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.player-area, .enemy-area {
    text-align: center;
    flex: 1;
}

.avatar {
    font-size: 5rem;
    margin: 10px 0;
    filter: drop-shadow(0 0 20px rgba(255, 200, 0, 0.5));
}

.vs {
    font-size: 3rem;
    font-weight: bold;
    color: #ffdd44;
    text-shadow: 0 0 30px #ff8800;
    margin: 0 15px;
}

.hp-bar {
    width: 80%;
    height: 20px;
    background: #333;
    border-radius: 20px;
    margin: 8px auto;
    overflow: hidden;
    border: 1px solid #555;
}

.hp-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff0040, #ff6a00);
    transition: width 0.3s ease;
    border-radius: 20px;
}

#playerHpFill {
    background: linear-gradient(90deg, #00cc66, #66ff99);
}

#enemyHpFill {
    background: linear-gradient(90deg, #ff0040, #ff6a00);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 0 0 10px currentColor;
}

/* Кнопки действий */
.actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.actions button {
    padding: 14px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: 0.25s;
    background: #2a2a4a;
    color: white;
    box-shadow: 0 5px 0 #0b0b1a;
    flex: 1 1 auto;
    min-width: 130px;
}

.actions button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #0b0b1a;
    background: #3d3d6b;
}

.actions button:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #0b0b1a;
}

#attackBtn {
    background: #c0392b;
    box-shadow: 0 5px 0 #78281f;
}
#attackBtn:hover {
    background: #e74c3c;
}

#specialBtn {
    background: #8e44ad;
    box-shadow: 0 5px 0 #5b2d6e;
}
#specialBtn:hover {
    background: #af7ac5;
}

#healBtn {
    background: #27ae60;
    box-shadow: 0 5px 0 #1a6e3b;
}
#healBtn:hover {
    background: #2ecc71;
}

/* Лог битвы */
#log {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 15px 20px;
    margin: 20px 0;
    max-height: 130px;
    overflow-y: auto;
    border-left: 4px solid #ffaa00;
    font-size: 1rem;
    line-height: 1.6;
}

#log p {
    margin: 4px 0;
    color: #ddd;
}

#log .player-log {
    color: #66ff99;
}

#log .enemy-log {
    color: #ff6a6a;
}

#log .special-log {
    color: #ffcc00;
}

/* Кнопка новой игры */
#newGameBtn {
    display: block;
    margin: 10px auto 0;
    padding: 12px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    background: #f39c12;
    border: none;
    border-radius: 60px;
    color: #1a1a2e;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 5px 0 #b86d0e;
}

#newGameBtn:hover {
    background: #f1c40f;
    transform: scale(1.05);
}

/* Адаптивность */
@media (max-width: 600px) {
    h1 {
        font-size: 2.2rem;
    }
    .avatar {
        font-size: 3.5rem;
    }
    .vs {
        font-size: 2rem;
    }
    .actions button {
        font-size: 1rem;
        padding: 10px 15px;
        min-width: 90px;
    }
    .char-btn {
        font-size: 1rem;
        padding: 10px 18px;
    }
}