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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #764ba2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.player-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-bar {
    background: #f0f0f0;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    color: #555;
}

.save-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.save-btn {
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

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

.game-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 968px) {
    .game-area {
        grid-template-columns: 1fr;
    }
}

.combat-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.character-panel {
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
    background: #f9f9f9;
}

.player-panel {
    border: 3px solid #4CAF50;
}

.enemy-panel {
    border: 3px solid #f44336;
}

.character-panel h2 {
    margin-bottom: 15px;
    font-size: 1.5em;
}

.enemy-sprite {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: visible;
}

.enemy-sprite svg {
    max-width: 100%;
    height: auto;
}

.animated-sprite {
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

.enemy-panel.boss {
    border: 4px solid #FF0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    animation: bossGlow 2s ease-in-out infinite;
}

@keyframes bossGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
    }
}

.health-bar {
    position: relative;
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid #333;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 1.5s ease;
    border-radius: 15px;
}

.enemy-health {
    background: linear-gradient(90deg, #f44336, #ff7043);
}

.health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats p {
    font-size: 1.1em;
    color: #555;
}

.combat-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.action-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    animation: pulse 1.5s ease-in-out infinite;
}

.action-btn.active {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    animation: activePulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes activePulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(76, 175, 80, 0.8);
    }
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.action-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.combat-log, .inventory-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
}

.combat-log h3, .inventory-section h3 {
    margin-bottom: 15px;
    color: #764ba2;
    font-size: 1.3em;
}

#logContent {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#logContent p {
    padding: 8px;
    background: #f0f0f0;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inventory-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inventory-item:hover {
    border-color: #667eea;
    background: #f0f0ff;
    transform: translateX(5px);
}

.inventory-item.equipped {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.item-name {
    font-weight: bold;
    color: #333;
}

.item-stats {
    font-size: 0.9em;
    color: #666;
}

.empty-inventory {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.loot-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    text-align: center;
    min-width: 300px;
}

.loot-notification h3 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.loot-notification p {
    margin: 10px 0;
    font-size: 1.1em;
    color: #555;
}

.level-up {
    animation: levelUpPulse 0.5s ease;
}

@keyframes levelUpPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.damage-text {
    color: #f44336;
    font-weight: bold;
}

.heal-text {
    color: #4CAF50;
    font-weight: bold;
}

.xp-text {
    color: #2196F3;
    font-weight: bold;
}

.block-text {
    color: #FF9800;
    font-weight: bold;
}

