/* Main stylesheet for Harvest Moon web game */
/* Provides responsive layout and pixel-perfect sprite rendering */

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

body {
    font-family: 'Courier New', monospace;
    background: #2c3e50;
    overflow: hidden;
    user-select: none;
}

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

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

#loading-content h1 {
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#loading-bar-container {
    width: 300px;
    height: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px auto;
}

#loading-bar {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    position: relative;
}

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

#loading-text {
    font-size: 1.2em;
    margin-top: 15px;
    opacity: 0.8;
}

#game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    position: relative;
}

#game-canvas {
    border: 2px solid #34495e;
    background: #3498db;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

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

.ui-panel {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #fff;
    border-radius: 4px;
    padding: 10px;
    color: white;
    pointer-events: auto;
}

.hidden {
    display: none;
}

#hud {
    top: 10px;
    right: 10px;
    width: 200px;
}

#stamina-bar {
    width: 100%;
    height: 20px;
    background: #e74c3c;
    border: 1px solid #fff;
    margin-bottom: 10px;
}

#time-display {
    font-size: 14px;
    text-align: center;
}

#inventory-panel {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 300px;
}

#inventory-grid {
    display: grid;
    grid-template-columns: repeat(8, 40px);
    gap: 2px;
}

.inventory-slot {
    width: 40px;
    height: 40px;
    border: 1px solid #bdc3c7;
    background: #34495e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.inventory-slot:hover {
    background: #5a6c7d;
}

#dialogue-panel {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    min-height: 120px;
}

#dialogue-text {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 10px;
}

#dialogue-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dialogue-option {
    padding: 8px 12px;
    background: #3498db;
    border: 1px solid #fff;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.dialogue-option:hover {
    background: #2980b9;
}

@media (max-width: 900px) {
    #game-canvas {
        width: 90vw;
        height: auto;
    }
    
    #hud {
        top: 5px;
        right: 5px;
        width: 150px;
    }
    
    #dialogue-panel {
        width: 90vw;
    }
}