/* Creature Adventure Styles */
* {
    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%);
    overflow: hidden;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: pulse 2s ease-in-out infinite;
}

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

.loading-bar {
    width: 300px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

#game-canvas-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game-canvas {
    max-width: 100%;
    max-height: 100%;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#ui-overlay > * {
    pointer-events: auto;
}

/* Battle UI Styles */
.battle-ui {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    border-radius: 10px;
    padding: 20px;
    color: white;
    min-width: 400px;
}

.battle-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.battle-button {
    padding: 10px 20px;
    background: #4CAF50;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.battle-button:hover {
    background: #45a049;
}

.battle-button:disabled {
    background: #666;
    cursor: not-allowed;
}

/* Creature Info Display */
.creature-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.creature-sprite {
    width: 64px;
    height: 64px;
}

.creature-details {
    flex: 1;
}

.creature-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.creature-level {
    font-size: 14px;
    color: #ccc;
}

.health-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #f44336, #ff9800, #4caf50);
    transition: width 0.3s ease;
}

/* Menu Styles */
.game-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    border-radius: 10px;
    padding: 15px;
    color: white;
}

.menu-button {
    display: block;
    width: 100%;
    padding: 8px 15px;
    margin: 5px 0;
    background: transparent;
    border: 1px solid #555;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.menu-button:hover {
    background: #555;
    border-color: #777;
}

/* Dialog Box */
.dialog-box {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    border: 2px solid #555;
    border-radius: 10px;
    padding: 20px;
    color: white;
    max-width: 600px;
    min-width: 400px;
    font-size: 16px;
    line-height: 1.5;
}

.dialog-text {
    margin-bottom: 15px;
}

.dialog-continue {
    text-align: right;
    font-size: 14px;
    color: #ccc;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}