/* HUD Styles */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

.hud-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hud-section span {
    font-size: 14px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hud-section.stats {
    gap: 8px;
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-label {
    min-width: 60px;
    font-size: 12px;
    color: #cccccc;
}

.bar {
    width: 120px;
    height: 8px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease, background-color 0.3s ease;
}

#health-bar { background: #E91E63; }
#hunger-bar { background: #FF9800; }
#thirst-bar { background: #2196F3; }
#stamina-bar { background: #4CAF50; }
#noise-bar { background: #f44336; }

/* Inventory Overlay */
#inventory-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
}

.inventory-panel {
    background: #2a2a2a;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.inventory-panel h2 {
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 24px;
}

.inventory-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #aaa;
}

#inventory-grid {
    display: grid;
    grid-template-columns: repeat(5, 80px);
    gap: 8px;
    margin-bottom: 20px;
}

.inventory-slot {
    width: 80px;
    height: 80px;
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.inventory-slot:hover {
    border-color: #666;
    background: #222;
}

.inventory-slot.occupied {
    border-color: #4CAF50;
    background: #1a2a1a;
}

.inventory-slot.dragging {
    opacity: 0.5;
}

.item-icon {
    font-size: 32px;
    margin-bottom: 4px;
}

.item-name {
    font-size: 10px;
    color: #ccc;
    text-align: center;
}

.item-quantity {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 10px;
    color: #fff;
    background: rgba(0,0,0,0.7);
    padding: 2px 4px;
    border-radius: 2px;
}

.inventory-equipped {
    margin-top: 20px;
}

.inventory-equipped h3 {
    margin-bottom: 10px;
    color: #ddd;
    font-size: 18px;
}

#equipped-slots {
    display: flex;
    gap: 15px;
}

.equipped-slot {
    width: 100px;
    height: 100px;
    background: #1a1a1a;
    border: 2px solid #666;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    color: #888;
}

#close-inventory {
    margin-top: 20px;
    padding: 12px 30px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

#close-inventory:hover {
    background: #45a049;
}

/* Interaction Prompt */
#interaction-prompt {
    position: absolute;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: rgba(0,0,0,0.8);
    padding: 12px 24px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.3);
}

#prompt-text {
    color: #fff;
    font-size: 14px;
}

/* Search Progress */
#search-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#search-progress svg {
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: rgba(255,255,255,0.2);
    stroke-width: 3;
}

.progress-fill {
    fill: none;
    stroke: #4CAF50;
    stroke-width: 3;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    transition: stroke-dashoffset 0.1s linear;
}

#search-text {
    color: #fff;
    font-size: 14px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}
