body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

#top-bar {
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

#player-info {
    display: flex;
    align-items: center;
}

#player-avatar {
    width: 50px;
    height: 50px;
    background-color: #3498db;
    border-radius: 25px;
    margin-right: 10px;
}

#player-stats {
    display: flex;
    flex-direction: column;
}

.bar {
    width: 150px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

#health-fill { background-color: #e74c3c; }
#mana-fill { background-color: #3498db; }
#exp-fill { background-color: #2ecc71; }

#game-time {
    text-align: right;
}

#day-night-cycle {
    width: 30px;
    height: 30px;
    border-radius: 15px;
    background: linear-gradient(to bottom, #87CEEB, #FF4500);
    margin-bottom: 5px;
}

#right-panel {
    position: absolute;
    top: 100px;
    right: 20px;
    width: 200px;
}

#minimap {
    width: 200px;
    height: 200px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    margin-bottom: 20px;
}

#quest-log {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    padding: 10px;
}

#quest-list {
    list-style-type: none;
    padding: 0;
}

#bottom-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 80%;
}

#inventory {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    padding: 10px;
    margin-right: 20px;
}

#inventory-slots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.inventory-slot {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

#action-bar {
    display: flex;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    padding: 10px;
}

.action-slot {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin: 0 5px;
}

#dialog-box {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    pointer-events: auto;
}

#npc-portrait {
    width: 100px;
    height: 100px;
    background-color: #3498db;
    border-radius: 50px;
    margin-right: 20px;
}

#dialog-text {
    flex-grow: 1;
}

#dialog-options {
    margin-top: 10px;
}

.dialog-option {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    padding: 10px;
    margin: 5px 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dialog-option:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#start-screen, #loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ffffff;
}

#start-button {
    background-color: #e74c3c;
    border: none;
    color: #ffffff;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#start-button:hover {
    background-color: #c0392b;
}

#loading-bar {
    width: 300px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

#loading-fill {
    height: 100%;
    width: 0%;
    background-color: #e74c3c;
    transition: width 0.3s ease;
}

.hidden {
    display: none !important;
}
