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

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
    background-color: #000;
    cursor: crosshair;
}

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

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    z-index: 100;
    user-select: none;
}

#health-bar {
    width: 200px;
    height: 20px;
    background-color: #333;
    border: 2px solid #666;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

#health-value {
    height: 100%;
    background-color: #f00;
    width: 100%;
    transition: width 0.3s;
}

#magicka-bar {
    width: 200px;
    height: 20px;
    background-color: #333;
    border: 2px solid #666;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

#magicka-value {
    height: 100%;
    background-color: #00f;
    width: 100%;
    transition: width 0.3s;
}

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

#level-info {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 14px;
}

#inventory {
    display: flex;
    gap: 10px;
}

.item {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #666;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    position: relative;
}

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

.game-info {
    margin-top: 20px;
    font-size: 14px;
    color: #ccc;
    line-height: 1.5;
}

#time-of-day {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 14px;
    color: white;
    text-shadow: 0 0 3px black;
    z-index: 100;
}

.enemy-health-bar {
    width: 40px;
    height: 5px;
    background-color: #333;
    position: absolute;
    transform: translate(-50%, -50%);
    border: 1px solid #000;
}

.enemy-health-value {
    height: 100%;
    background-color: #f00;
    width: 100%;
}

#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 100;
    display: block;
}

#crosshair svg {
    transition: all 0.2s ease;
}

#crosshair.highlight svg {
    stroke: gold;
    stroke-width: 2px;
    transform: scale(1.2);
}

#cutscene-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    font-family: serif;
    font-size: 24px;
    letter-spacing: 1px;
    line-height: 1.8;
    text-align: center;
    padding: 20px;
}

#game-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 200;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding: 5% 10%;
}

.menu-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('B346CBEF-7568-4271-9BC3-D73AA17A5EBF.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.light-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 40%, rgba(107, 142, 35, 0.4) 0%, rgba(0, 0, 0, 0) 70%),
                radial-gradient(ellipse at 70% 60%, rgba(173, 255, 47, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 50% 70%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 10% 60%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 30% 90%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 100px 100px;
    animation: floatParticles 20s linear infinite;
}

@keyframes floatParticles {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

.game-logo {
    align-self: center;
    margin-top: 5%;
    text-align: center;
    transform: translateY(-50px);
    animation: floatLogo 8s ease-in-out infinite;
}

.game-title-image {
    max-width: 60%;
    height: auto;
    margin-top: 20px;
    filter: drop-shadow(0 0 15px rgba(107, 142, 35, 0.8));
}

.game-icon {
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(-50px); }
    50% { transform: translateY(-30px); }
}

.game-logo h1 {
    font-size: 4rem;
    font-family: "Trajan Pro", serif;
    font-weight: normal;
    letter-spacing: 4px;
    color: #d4af37;
    text-shadow: 0 0 10px rgba(0, 75, 0, 0.6);
    margin: 0;
}

.game-logo h2 {
    font-size: 5rem;
    font-family: "Trajan Pro", serif;
    letter-spacing: 8px;
    color: #a9e5a7;
    text-shadow: 0 0 15px rgba(107, 142, 35, 0.8);
    margin: 0;
}

.menu-options {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 10%;
    margin-top: -50%;
}

.menu-option {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.5rem;
    font-family: "Trajan Pro", serif;
    letter-spacing: 2px;
    margin: 8px 0;
    cursor: pointer;
    text-align: right;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 15px;
}

.menu-option:hover, .menu-option:focus {
    color: #a9e5a7;
    text-shadow: 0 0 8px rgba(107, 142, 35, 0.6);
    outline: none;
}

.menu-option:hover::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    width: 15px;
    height: 2px;
    background-color: #a9e5a7;
    transform: translateY(-50%);
    box-shadow: 0 0 5px rgba(107, 142, 35, 0.8);
}

#start-game {
    color: #a9e5a7;
    text-shadow: 0 0 8px rgba(107, 142, 35, 0.6);
}

#start-game:hover {
    color: #d4ff9e;
    text-shadow: 0 0 12px rgba(107, 142, 35, 0.8);
}

#game-menu h1 {
    margin-bottom: 20px;
    color: #f5a623;
}

#minimap-container {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 200px;
    height: 200px;
    background-color: transparent;
    border: 2px solid #666;
    border-radius: 5px;
    overflow: hidden;
    display: none;
    z-index: 100;
}

#minimap {
    width: 100%;
    height: 100%;
    position: relative;
}

#player-marker {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ff0000;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 101;
    pointer-events: none;
}

.npc-marker {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.guard-marker {
    background-color: #0000ff;
}

.citizen-marker {
    background-color: #00ff00;
}

#underwater-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 100, 150, 0.5);
    pointer-events: none;
    display: none;
    z-index: 10;
    transition: opacity 0.5s ease, background-color 0.5s ease;
}

#dialog-box {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    border-radius: 5px;
    display: none;
    z-index: 100;
    font-family: Arial, sans-serif;
    border: 1px solid #555;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

#dialog-text {
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 16px;
}

.dialog-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.dialog-button {
    background-color: rgba(50, 50, 50, 0.7);
    border: 1px solid #777;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.dialog-button:hover {
    background-color: rgba(80, 80, 80, 0.9);
}

.quest-button {
    background-color: rgba(107, 142, 35, 0.7);
}

.quest-button:hover {
    background-color: rgba(107, 142, 35, 0.9);
}

#inventory-panel {
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    border: none;
    border-radius: 0;
    color: white;
    display: none;
    flex-direction: column;
    z-index: 1000;
    padding: 40px;
    font-family: Arial, sans-serif;
}

#inventory-panel h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #d4af37;
    font-family: "Trajan Pro", serif;
    letter-spacing: 2px;
}

.inventory-container {
    display: flex;
    flex: 1;
    min-height: 250px;
    gap: 20px;
}

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

.inventory-item {
    background-color: rgba(50, 50, 50, 0.7);
    border: 1px solid #555;
    border-radius: 5px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    height: 120px;
}

#item-model-container {
    width: 40%;
    height: 300px;
    background-color: rgba(30, 30, 30, 0.5);
    border-radius: 5px;
    position: relative;
}

.inventory-item:hover {
    background-color: rgba(80, 80, 80, 0.9);
}

.inventory-item.selected {
    background-color: rgba(107, 142, 35, 0.7);
    border-color: #a9e5a7;
}

.item-icon {
    font-size: 28px;
    margin-bottom: 5px;
}

.item-name {
    font-size: 14px;
    text-align: center;
}

.item-quantity {
    margin-top: 5px;
    font-size: 12px;
    color: #ccc;
}

.inventory-details {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(40, 40, 40, 0.7);
    border-radius: 5px;
    min-height: 120px;
}

.inventory-details h3 {
    margin-top: 0;
    color: #a9e5a7;
    margin-bottom: 10px;
}

#item-stats {
    margin-top: 10px;
    color: #d4af37;
}

.inventory-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    gap: 10px;
}

.inventory-controls button {
    background-color: rgba(50, 50, 50, 0.7);
    border: 1px solid #777;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.inventory-controls button:hover {
    background-color: rgba(80, 80, 80, 0.9);
}

#use-item {
    background-color: rgba(107, 142, 35, 0.7);
}

#use-item:hover {
    background-color: rgba(107, 142, 35, 0.9);
}

#close-inventory {
    background-color: rgba(150, 50, 50, 0.7);
}

#close-inventory:hover {
    background-color: rgba(150, 50, 50, 0.9);
}

#fullscreen-map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.95);
    z-index: 500;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#map-canvas {
    width: 80%;
    height: 80%;
    border: 2px solid #666;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    background-color: rgba(20, 30, 20, 0.4);
    cursor: grab;
}

#map-canvas:active {
    cursor: grabbing;
}

#map-controls {
    width: 80%;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-map {
    background-color: #a9e5a7;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#close-map:hover {
    background-color: #8cd68a;
}

#map-locations {
    display: flex;
    gap: 10px;
}

.map-location {
    background-color: rgba(50, 50, 50, 0.7);
    color: white;
    border: 1px solid #777;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.map-location:hover {
    background-color: rgba(80, 80, 80, 0.9);
    box-shadow: 0 0 8px rgba(107, 142, 35, 0.6);
}

.map-label {
    position: absolute;
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    pointer-events: none;
    transform: translate(-50%, -100%);
    margin-top: -10px;
    text-shadow: 0 0 3px black;
    z-index: 501;
    white-space: nowrap;
}

.map-player-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #ff5500;
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 502;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

#map-zoom-controls {
    display: flex;
    gap: 5px;
    margin-right: 20px;
}

.map-zoom-button {
    background-color: #a9e5a7;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.map-zoom-button:hover {
    background-color: #8cd68a;
}

#reset-view {
    margin-left: auto;
}

.travel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0;
    z-index: 1000;
    animation: fade-in-out 1s ease-in-out;
}

@keyframes fade-in-out {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

#name-prompt input:focus {
    border-color: #a9e5a7;
    box-shadow: 0 0 10px rgba(107, 142, 35, 0.4);
}

#load-game-menu::-webkit-scrollbar {
    width: 8px;
}

#load-game-menu::-webkit-scrollbar-track {
    background: rgba(30, 30, 30, 0.4);
    border-radius: 4px;
}

#load-game-menu::-webkit-scrollbar-thumb {
    background: rgba(107, 142, 35, 0.5);
    border-radius: 4px;
}

#load-game-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 142, 35, 0.7);
}