#enemy-hp-bar,
#player-hp-bar {
    width: 100%;
}

/* General Body Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url('libary-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #e0e0e0;
    overflow-x: hidden;
}

/* Game Container */
.game-container {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 20, 20, 1) 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 30px 60px rgba(255, 165, 0, 0.3);
    padding: 30px;
    width: 90%;
    max-width: 1200px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 165, 0, 0.3);
    position: relative;
}

/* Character Boxes */
.enemy-box, .player-box {
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.9) 0%, rgba(25, 25, 25, 0.95) 100%);
    border: 2px solid rgba(255, 165, 0, 0.4);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.enemy-box::before, .player-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2));
}

.enemy-box:hover, .player-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 165, 0, 0.3);
}

/* Character Names */
.character-name {
    margin: 0 0 10px 0;
    font-size: 2em;
    color: #ffa500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
}

/* Health Bar */
.hp-bar, .stagger-bar, .emotion-bar {
    background: linear-gradient(90deg, #2a2a2a, #3a3a3a);
    border-radius: 10px;
    height: 25px;
    margin: 10px 0;
    border: 2px solid rgba(255, 165, 0, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4500 0%, #ff6b6b 100%);
    transition: width 0.8s cubic-bezier(0.4, 1, 0.6, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

.stagger-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff8c00 0%, #ffb84d 100%);
    transition: width 0.8s cubic-bezier(0.4, 1, 0.6, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.emotion-fill {
    height: 100%;
    background: linear-gradient(90deg, #9b59b6 0%, #e74c3c 100%);
    transition: width 0.8s cubic-bezier(0.4, 1, 0.6, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
}

.hp-fill::after, .stagger-fill::after, .emotion-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2));
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Battlefield */
.battlefield {
    position: relative;
    width: 100%;
    height: 200px;
    border: 2px solid #ffa500;
    border-radius: 10px;
    background-color: rgba(32, 32, 32, 0.6);
    margin-bottom: 15px;
    overflow: hidden;
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
}

.battle-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Rolang.png'); 
    background-size: cover; 
    background-position: center;
    z-index: -1;
}

/* Character Sprites */
.character-sprite {
    width: 120px;
    height: 120px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 15px;
    margin: 10px auto;
    display: block;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 165, 0, 0.3);
    transition: all 0.3s ease;
}

.character-sprite:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.player-sprite {
    background-image: url('roland-sprite.jpg');
}

.enemy-sprite {
    background-image: url('arga.jpg');
}

/* Physical Attack Section */
#physical-attack-title {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

#physical-attack-options {
    background-color: rgba(231, 76, 60, 0.1);
    border: 2px solid #c0392b;
    border-radius: 10px;
}

#magic-attack-title {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}
#magic-attack-section {
    background-color: #ffa500; 
    border: 2px solid #ff8c00; 
    border-radius: 10px;
}

#special-actions-title {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

#special-actions-options {
    background-color: rgba(243, 156, 18, 0.1);
    border: 2px solid #e67e22;
    border-radius: 10px;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; 
    margin-top: 15px;
}

/* Remove .controls and move button styles */
.attack-btn, .special-btn {
    flex: 1 1 180px;
    margin: 5px; 
    padding: 12px 16px;
    background: linear-gradient(135deg, #ffa500, #ffb84d);
    color: #000;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.95em;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.mass-attack {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 1.1em;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border: 2px solid #a93226;
}

.mass-attack:not(:disabled):hover {
    background: linear-gradient(135deg, #c0392b, #922b21);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 16px rgba(231, 76, 60, 0.4);
}

.attack-btn::before, .special-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    transition: left 0.5s ease;
}

.attack-btn:hover::before, .special-btn:hover::before {
    left: 100%;
}

.attack-btn:hover, .special-btn:hover {
    background: linear-gradient(135deg, #ff8c00, #ffa500);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.attack-btn:active, .special-btn:active {
    transform: translateY(0) scale(0.98);
}

.attack-btn:disabled, .special-btn:disabled {
    background: linear-gradient(135deg, #666, #888);
    cursor: not-allowed;
    opacity: 0.6;
    text-decoration: line-through;
    transform: none;
    box-shadow: none;
}

/* Event Log */
.event-log {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid rgba(255, 165, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%);
    margin-bottom: 20px;
    font-style: italic;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.event-log:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.event-log h3 {
    margin: 0 0 15px 0;
    color: #ffa500;
    font-size: 1.5em;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid rgba(255, 165, 0, 0.3);
    padding-bottom: 10px;
}

#log-container {
    line-height: 1.6;
    font-size: 0.95em;
}

.log-entry {
    margin: 5px 0;
    padding: 8px 12px;
    background: rgba(255, 165, 0, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ffa500;
    transition: all 0.2s ease;
}

.log-entry:hover {
    background: rgba(255, 165, 0, 0.15);
    transform: translateX(5px);
}

/* Menu Section */
.menu-section {
    margin-top: 20px;
    padding: 15px;
    border: 2px solid rgba(255, 165, 0, 0.3);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(35, 35, 35, 0.9) 0%, rgba(25, 25, 25, 0.95) 100%);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.menu-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.menu-title {
    color: #fff;
    padding: 12px 20px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    border-radius: 10px;
    font-size: 1.1em;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2));
    transition: left 0.5s ease;
}

.menu-title:hover::before {
    left: 100%;
}

.menu-title:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 165, 0, 0.3);
}

.attack-options {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
    padding: 15px;
}

.menu-section.toggle-open .attack-options {
    display: flex;
    animation: slideDown 0.3s ease-out;
}

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

.attack-options button {
    flex: 1 1 200px;
    margin: 5px;
    padding: 10px;
    background-color: #ffa500;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.attack-options button:hover {
    background-color: #ff8c00;
}

.attack-options button:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.status-effects {
    font-size: 1.1em;
    margin: 15px 0;
    min-height: 1.5em;
    color: #ffa500;
    text-align: center;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    background: rgba(255, 165, 0, 0.1);
    border-radius: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.turn-counter {
    position: absolute;
    top: 15px;
    right: 20px;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.9), rgba(255, 140, 0, 0.9));
    color: #000;
    padding: 8px 16px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.1em;
    border: 2px solid rgba(255, 165, 0, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

/* Add animation for status effects */
@keyframes statusPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.status-effects:not(:empty) {
    animation: statusPulse 2s infinite;
}

.status-effect-animation {
    animation: statusEffect 0.5s ease-in-out;
}

@keyframes statusEffect {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.5) hue-rotate(90deg); }
    100% { filter: brightness(1); }
}

.healing-animation {
    animation: healing 0.8s ease-in-out;
}

@keyframes healing {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.3) hue-rotate(120deg); }
    100% { filter: brightness(1); }
}

/* Style for the reset button */
.reset-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border: none;
    padding: 15px 30px;
    margin: 15px auto;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: block;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Improve button disabled state visibility */
.attack-options button:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.7;
    text-decoration: line-through;
}

/* Add hover effect for menu sections */
.menu-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 165, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.shake-animation {
    animation: shake 0.6s cubic-bezier(0.36, 0.7, 0.19, 0.97);
}

@keyframes shake {
    10%, 90% { transform: translate3d(10px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 70% { transform: translate3d(4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
    80% { transform: translate3d(-10px, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* Scrollbar Styling */
.event-log::-webkit-scrollbar {
    width: 8px;
}

.event-log::-webkit-scrollbar-track {
    background: rgba(255, 165, 0, 0.1);
    border-radius: 4px;
}

.event-log::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffa500, #ff8c00);
    border-radius: 4px;
}

.event-log::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff8c00, #e67e22);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        width: 95%;
        padding: 20px;
    }

    .character-sprite {
        width: 80px;
        height: 80px;
    }

    .attack-btn, .special-btn {
        flex: 1 1 140px;
        font-size: 0.85em;
        padding: 10px 12px;
    }

    .character-name {
        font-size: 1.5em;
    }
    
    .turn-counter {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 15px;
        text-align: center;
    }
}

/* Combo Counter */
.combo-counter {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
    margin: 10px auto;
    box-shadow: 0 4px 8px rgba(255, 17, 0, 0.3);
    border: 2px solid #ff8888;
    transition: all 0.3s ease;
    max-width: 150px;
}

.combo-counter:not(:empty) {
    animation: comboPulse 2s infinite;
}

@keyframes comboPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}


