/* ============================================
   VOIDBORNE LEGACY - HUD STYLES
   Arcane Ink Productions
   ============================================ */

/* Game Screen Container */
#game-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    overflow: hidden;
}

#game-screen.active {
    display: block;
}

/* Game World Background */
.game-world {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/backgrounds/ashen_crypt.png');
    background-position: center center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 0;
}

.game-world-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-ui);
    font-size: 1.5rem;
    color: var(--shadow-light);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.3;
}

/* HUD - TOP LEFT (Player Status) */
.hud-top-left {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}

.player-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--gold-ancient);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.player-level {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* HUD Bars */
.hud-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
}

.hud-bar-icon {
    width: 20px;
    text-align: center;
    font-size: 0.875rem;
}

.hud-bar-track {
    flex: 1;
    height: 12px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-dark);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.hud-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
    position: relative;
}

.hud-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
}

.hud-bar-text {
    font-family: var(--font-ui);
    font-size: 0.625rem;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: right;
}

/* Bar Colors */
.hud-bar-health .hud-bar-icon { color: #dc2626; }
.hud-bar-health .hud-bar-fill { 
    background: linear-gradient(90deg, #7f1d1d, #dc2626, #ef4444);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
}

.hud-bar-mana .hud-bar-icon { color: var(--arcane-purple); }
.hud-bar-mana .hud-bar-fill { 
    background: linear-gradient(90deg, #4c1d95, #7c3aed, #a78bfa);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.hud-bar-stamina .hud-bar-icon { color: #22c55e; }
.hud-bar-stamina .hud-bar-fill { 
    background: linear-gradient(90deg, #166534, #22c55e, #4ade80);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.hud-bar-xp .hud-bar-icon { color: var(--gold-ancient); }
.hud-bar-xp .hud-bar-fill { 
    background: linear-gradient(90deg, #854d0e, #ca8a04, #facc15);
    box-shadow: 0 0 8px rgba(202, 138, 4, 0.5);
}

/* Hotbar */
.hotbar {
    display: flex;
    gap: 4px;
    margin-top: 12px;
}

.hotbar-slot {
    width: 48px;
    height: 48px;
    background: rgba(18, 18, 26, 0.9);
    border: 2px solid var(--border-dark);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.hotbar-slot:hover {
    border-color: var(--arcane-purple);
    transform: translateY(-2px);
}

.hotbar-slot::after {
    content: attr(data-key);
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-family: var(--font-ui);
    font-size: 0.5rem;
    color: var(--text-muted);
}

.hotbar-slot.has-item {
    background: var(--shadow-mid);
    border-color: var(--shadow-light);
}

.hotbar-slot.drag-over {
    border-color: var(--gold-ancient);
    background: rgba(212, 165, 116, 0.2);
    transform: scale(1.05);
}

.hotbar-slot.pressed {
    transform: scale(0.9);
    border-color: var(--arcane-purple);
}

.hotbar-slot.on-cooldown {
    opacity: 0.6;
}

.hotbar-icon {
    font-size: 1.5rem;
    pointer-events: none;
}

.hotbar-icon.unavailable {
    opacity: 0.3;
    filter: grayscale(1);
}

.cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: bold;
    color: white;
    border-radius: 4px;
}

/* HUD - TOP RIGHT (Mini Info) */
.hud-top-right {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mini-compass {
    width: 50px;
    height: 50px;
    background: rgba(18, 18, 26, 0.85);
    border: 2px solid var(--border-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--gold-ancient);
}

.location-text {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--gold-ancient);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-align: center;
    padding: 10px 24px;
    background: linear-gradient(180deg, rgba(18, 18, 26, 0.95) 0%, rgba(10, 10, 15, 0.9) 100%);
    border: 1px solid var(--border-dark);
    border-top: 2px solid var(--gold-ancient);
    border-bottom: 2px solid var(--gold-ancient);
    text-shadow: 0 0 10px rgba(212, 165, 116, 0.5);
    position: relative;
}

.location-text::before,
.location-text::after {
    content: '◆';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-ancient);
    font-size: 0.5rem;
    opacity: 0.7;
}

.location-text::before {
    left: 8px;
}

.location-text::after {
    right: 8px;
}

/* HUD - BOTTOM LEFT (Menu Buttons) */
.hud-bottom-left {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-buttons {
    display: grid;
    grid-template-columns: repeat(3, 70px);
    grid-template-rows: repeat(2, 70px);
    gap: 6px;
}

/* Sprite-based Menu Buttons */
.menu-btn {
    width: 70px;
    height: 70px;
    background-color: transparent;
    background-image: url('../img/ui/buttons/buttons.png');
    background-repeat: no-repeat;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    filter: brightness(0.9);
    overflow: hidden;
}

/* Each button is ~512x512 in a 1536x1024 sprite, scaled to 70px */
.menu-btn[data-panel="inventory"] { 
    background-position: 0px 0px;
    background-size: 210px 140px; /* 70*3 x 70*2 */
}
.menu-btn[data-panel="equipment"] { 
    background-position: -70px 0px;
    background-size: 210px 140px;
}
.menu-btn[data-panel="skills"] { 
    background-position: -140px 0px;
    background-size: 210px 140px;
}
.menu-btn[data-panel="map"] { 
    background-position: 0px -70px;
    background-size: 210px 140px;
}
.menu-btn[data-panel="quests"] { 
    background-position: -70px -70px;
    background-size: 210px 140px;
}
.menu-btn[data-panel="settings"] { 
    background-position: -140px -70px;
    background-size: 210px 140px;
}

.menu-btn:hover {
    transform: scale(1.15);
    filter: brightness(1.2) drop-shadow(0 0 12px rgba(212, 165, 116, 0.6));
    z-index: 10;
}

.menu-btn:active {
    transform: scale(0.95);
}

.menu-btn.active {
    filter: brightness(1.3) drop-shadow(0 0 15px rgba(139, 92, 246, 0.8));
}

/* Hide the icon and label - the sprite has them built in */
.menu-btn-icon,
.menu-btn-label {
    display: none;
}

.btn-back-title {
    font-family: var(--font-ui);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    padding: 8px 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.btn-back-title:hover {
    color: var(--text-secondary);
    border-color: var(--border-dark);
}

/* HUD - BOTTOM CENTER (Interaction Prompt) */
.hud-bottom-center {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.interaction-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(18, 18, 26, 0.9);
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    animation: promptPulse 2s ease-in-out infinite;
}

@keyframes promptPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.prompt-key {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gold-ancient);
    background: var(--shadow-deep);
    padding: 4px 10px;
    border: 1px solid var(--gold-ancient);
    border-radius: 3px;
}

.prompt-text {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* HUD - BOTTOM RIGHT (Dev Tools) */
.hud-bottom-right {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

