body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    overflow: hidden;
}

section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

section[hidden] {
    opacity: 0;
    pointer-events: none;
}

#landing {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#landing h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#landing p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

button {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

button:active {
    transform: translateY(0);
}

#battle {
    background: linear-gradient(135deg, #2c1810 0%, #5c4a2a 100%);
}

#field {
    border: 3px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: linear-gradient(180deg, #87CEEB 0%, #98FB98 30%, #8FBC8F 70%, #A0522D 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.combat-log-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
}

.combat-log {
    background: rgba(0,0,0,0.8);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 12px;
    color: #f0f0f0;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
    max-height: 150px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.battle-ui {
    position: absolute;
    top: 5%;
    left: 0;
    right: 0;
    height: auto;
    pointer-events: none;
}

.character-info {
    position: absolute;
    top: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(0,0,0,0.6));
    padding: 15px 25px 15px 15px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    font-weight: bold;
    width: 40%;
}

.character-info.left {
    left: 0;
    clip-path: polygon(0 0, 80% 0, 100% 50%, 80% 100%, 0 100%);
    border-right: none;
}

.character-info.right {
    right: 0;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 20% 100%, 0 50%);
    border-left: none;
    padding: 20px 20px 20px 30px;
}

.character-name {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.health-bar-container {
    width: 100%;
    height: 20px;
    background: #333;
    border: 2px solid white;
    border-radius: 0;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}

.character-info.left .health-bar-container {
    clip-path: polygon(0 0, 85% 0, 100% 50%, 85% 100%, 0 100%);
}

.character-info.right .health-bar-container {
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 15% 100%, 0 50%);
}

.character-info.right .character-name {
    text-align: right;
}

.character-info.right .hp-text {
    text-align: right;
}

.health-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    transition: width 0.3s ease, background 0.3s ease;
    position: relative;
}

.character-info.right .health-bar-fill {
    background: linear-gradient(270deg, #4CAF50, #66BB6A);
    transform-origin: right center;
}

.character-info.right .health-bar-fill.yellow {
    background: linear-gradient(270deg, #FFC107, #FFD54F);
}

.character-info.right .health-bar-fill.red {
    background: linear-gradient(270deg, #F44336, #EF5350);
}

.health-bar-fill.yellow {
    background: linear-gradient(90deg, #FFC107, #FFD54F);
}

.health-bar-fill.red {
    background: linear-gradient(90deg, #F44336, #EF5350);
}

.hp-text {
    margin: 8px 0;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    font-weight: bold;
}

#char-a-info {
    background: linear-gradient(135deg, rgba(65,105,225,0.8), rgba(65,105,225,0.4));
}

#char-b-info {
    background: linear-gradient(135deg, rgba(220,20,60,0.8), rgba(220,20,60,0.4));
}

#end {
    background: linear-gradient(135deg, #2d5016 0%, #3e6b1a 100%);
    text-align: center;
}

#end h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.end-buttons {
    display: flex;
    gap: 2rem;
}

.end-buttons button {
    margin: 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    #field {
        width: 90vw;
        height: 60vh;
    }
    
    #landing h1 {
        font-size: 2rem;
    }
    
    .end-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .character-info {
        width: 45%;
        padding: 12px 20px 12px 12px;
    }
    
    .character-info.right {
        padding: 12px 12px 12px 20px;
    }
    
    .character-name {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .health-bar-container {
        height: 16px;
        margin: 8px 0;
    }
    
    .hp-text {
        font-size: 1rem;
        margin: 6px 0;
    }
    
    .combat-log-container {
        width: 95%;
        bottom: 10px;
    }
    
    .combat-log {
        font-size: 12px;
        padding: 8px;
        max-height: 120px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    section,
    button {
        transition: none;
    }
    
    button:hover {
        transform: none;
    }
}
