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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.game-header {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.game-header h1 {
    color: #ffd700;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

.round-display {
    color: white;
    font-size: 1.5em;
    font-weight: bold;
}

/* Player Stats */
.players-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.player-stat-box {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 3px solid;
}

.player1-box {
    border-color: #667eea;
}

.player2-box {
    border-color: #f093fb;
}

.player-stat-box h2 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.stat {
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.stat span {
    color: #ffd700;
    font-size: 1.4em;
}

.buff-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    transition: all 0.3s;
}

.buff-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.buff-btn:active {
    transform: scale(0.95);
}

.btn-icon {
    font-size: 1.5em;
}

.keybind {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.8em;
}

/* Battle Arena */
.battle-arena {
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.arena-box {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 4px solid #ffd700;
    border-radius: 15px;
    height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 40px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.turn-indicator {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 30px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

/* Fighters */
.fighter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.character-sprite {
    font-size: 6em;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.8));
    animation: idle-bob 2s ease-in-out infinite;
}

@keyframes idle-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.health-bar {
    width: 150px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ffd700;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00 0%, #44ff44 100%);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.character-name {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.3em;
    text-shadow: 2px 2px 4px black;
}

.hp-display {
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 20px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    border: 2px solid #ffd700;
}

.hp-value {
    color: #00ff00;
    font-size: 1.4em;
    text-shadow: 0 0 5px #00ff00;
}

.vs-text {
    font-size: 4em;
    color: #ffd700;
    font-weight: bold;
    text-shadow: 3px 3px 6px black;
    animation: vs-pulse 1.5s infinite;
}

@keyframes vs-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* Control Panel */
.control-panel {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.phase-info {
    margin-bottom: 20px;
    text-align: center;
}

.phase-info h3 {
    color: #ffd700;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.phase-info p {
    color: white;
    font-size: 1.2em;
}

/* Timer Display */
.timer-display {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(255, 107, 107, 0.5);
    animation: timer-pulse 1s infinite;
}

@keyframes timer-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.timer-label {
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.timer-value {
    color: #ffd700;
    font-size: 5em;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    animation: timer-tick 1s infinite;
    line-height: 1;
}

@keyframes timer-tick {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.timer-subtitle {
    color: white;
    font-size: 1.1em;
    margin-top: 10px;
    opacity: 0.9;
}

.timer-display.urgent {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    animation: timer-urgent 0.5s infinite;
}

@keyframes timer-urgent {
    0%, 100% { transform: scale(1); box-shadow: 0 5px 25px rgba(255, 0, 0, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 8px 35px rgba(255, 0, 0, 0.8); }
}

.timer-display.hidden {
    display: none;
}

.battle-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.battle-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.start-btn {
    background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
    color: white;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 0, 0.4);
}

.start-btn:disabled {
    background: gray;
    cursor: not-allowed;
    transform: none;
}

.reset-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%);
    color: white;
}

.reset-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* Battle Log */
.battle-log {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.battle-log h3 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.log-content {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    height: 150px;
    overflow-y: auto;
}

.log-entry {
    color: white;
    padding: 5px;
    margin-bottom: 5px;
    border-left: 3px solid #ffd700;
    padding-left: 10px;
    animation: log-slide 0.3s ease;
}

@keyframes log-slide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Instructions */
.instructions {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.instructions h3 {
    color: #ffd700;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.instruction-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.instruction-step {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    position: relative;
}

.step-number {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffd700;
    color: black;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.instruction-step h4 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.instruction-step p {
    color: white;
    line-height: 1.5;
}

/* Animation Effects */
.attacking {
    animation: attack-shake 0.4s ease;
}

@keyframes attack-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px) rotate(-5deg); }
    75% { transform: translateX(10px) rotate(5deg); }
}

.hit-flash {
    animation: flash 0.3s ease;
}

@keyframes flash {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(2.5) saturate(2); }
}

.buffed {
    animation: buff-glow 0.6s ease;
}

@keyframes buff-glow {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 215, 0, 0)); }
    50% { filter: drop-shadow(0 0 30px rgba(255, 215, 0, 1)); }
}

/* Sword Slash */
.sword-slash {
    position: fixed;
    font-size: 6em;
    animation: slash-spin 0.5s ease-out;
    pointer-events: none;
    z-index: 1000;
}

@keyframes slash-spin {
    0% {
        transform: rotate(-45deg) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(45deg) scale(1.5);
        opacity: 0;
    }
}

/* Floating Text */
.floating-text {
    position: fixed;
    font-size: 2.5em;
    font-weight: bold;
    animation: float-up 1s ease-out forwards;
    pointer-events: none;
    z-index: 1001;
    text-shadow: 3px 3px 6px black;
}

.floating-text.buff {
    color: #ffd700;
}

.floating-text.damage {
    color: #ff4444;
}

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1.8);
    }
}

/* Particles */
.particle {
    position: fixed;
    font-size: 2em;
    animation: particle-burst 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes particle-burst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.3) rotate(360deg);
    }
}

#effects-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Responsive */
@media (max-width: 1024px) {
    .players-stats {
        grid-template-columns: 1fr;
    }

    .instruction-grid {
        grid-template-columns: 1fr;
    }

    .arena-box {
        height: 350px;
        padding: 20px;
    }

    .character-sprite {
        font-size: 4em;
    }
}
