/* Game HUD and In-Game Screens */

.game-hud {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    z-index: 200;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

.hud-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.player-hud-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.4);
    padding: 5px 15px 5px 5px;
    border-radius: 30px;
    border: 1px solid rgba(255,215,0,0.2);
}

.hud-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--accent-color);
    object-fit: contain;
}

.health-bar {
    display: flex;
    gap: 4px;
}

.heart {
    width: 28px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    position: relative;
}

.heart.full::after { content: '❤️'; font-size: 24px; }
.heart.half::after { content: '💔'; font-size: 24px; }
.heart.empty { opacity: 0.3; }
.heart.empty::after { content: '🖤'; font-size: 24px; }

.survival-timer, .bonus-counter {
    font-size: 1.2rem;
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.4);
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}

.ability-hud-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cooldown-container {
    position: relative;
    width: 50px;
    height: 50px;
}

.cooldown-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

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

.cooldown-fill {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 8;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.ability-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

.ability-hint {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-color);
    background: rgba(0,0,0,0.6);
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.interaction-overlay {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: none;
    z-index: 300;
}

.interaction-prompt {
    background: rgba(0,0,0,0.8);
    padding: 8px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--accent-color);
    color: white;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    font-weight: bold;
}

.progress-container {
    width: 200px;
    height: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: width 0.1s linear;
}

.death-content {
    text-align: center;
    z-index: 100;
}

.death-title {
    font-size: 5rem;
    color: #ff4444;
    text-shadow: 0 0 30px #000, 0 0 10px #ff0000;
    margin-bottom: 20px;
    font-family: 'Pangolin', cursive;
    font-weight: bold;
    letter-spacing: -2px;
}

.death-stats {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.win-content {
    text-align: center;
    background: rgba(10, 5, 26, 0.9);
    padding: 40px;
    border-radius: 30px;
    border: 2px solid var(--accent-color);
    max-width: 500px;
}

.win-title {
    font-family: 'Marck Script', cursive;
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.win-subtitle {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 20px;
    color: #e0a7ff;
}

.win-title::after {
    content: " 🐶 Ви врятували свого вірного друга!";
    display: block;
    font-size: 1.2rem;
    color: #ffd700;
    margin-top: 10px;
}

.win-stats {
    font-size: 1.2rem;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 15px;
}

.update-info {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 30px;
}

.rune-container {
    display: flex;
    gap: 5px;
    background: rgba(0,0,0,0.4);
    padding: 5px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255,215,0,0.3);
    pointer-events: auto;
    cursor: help;
    margin-top: 8px;
    position: relative;
    width: fit-content;
}

.rune-slot {
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    position: relative;
    transition: all 0.5s ease;
}

.rune-slot.active {
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
    border-color: #fff;
    transform: scale(1.1);
}

.rune-slot.active::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 14px;
    font-weight: bold;
}

.rune-tooltip {
    position: absolute;
    left: 110%;
    top: 0;
    background: rgba(10, 5, 30, 0.95);
    border: 1px solid var(--accent-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    width: 200px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.rune-container:hover .rune-tooltip {
    opacity: 1;
}

.puppy-whisper {
    position: absolute;
    font-size: 1.2rem;
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 2px 4px #000;
    animation: whisperFloat 2.5s forwards ease-out;
    pointer-events: none;
    white-space: nowrap;
    z-index: 500;
}

@keyframes whisperFloat {
    0% { transform: translateY(0); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(-100px); opacity: 0; }
}

.super-awakened {
    animation: superScreenPulse 2s infinite alternate;
}

@keyframes superScreenPulse {
    from { box-shadow: inset 0 0 50px rgba(255, 215, 0, 0); }
    to { box-shadow: inset 0 0 150px rgba(255, 215, 0, 0.3); }
}

.divine-glow {
    filter: drop-shadow(0 0 20px #ffd700) brightness(1.5) !important;
}

.ancient-rune {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('magic_sphere.png');
    background-size: contain;
    background-repeat: no-repeat;
    animation: runePulse 2s infinite ease-in-out;
    filter: drop-shadow(0 0 15px #7b2ff7);
    z-index: 45;
}

@keyframes runePulse {
    0%, 100% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 15px #7b2ff7); }
    50% { transform: scale(1.1) translateY(-10px); filter: drop-shadow(0 0 30px #e0a7ff); }
}

.quest-marker {
    position: fixed;
    top: 50%;
    right: 30px;
    font-size: 50px;
    color: #ffd700;
    z-index: 1000;
    pointer-events: none;
    text-shadow: 0 0 10px #000;
    animation: sideBounce 0.5s infinite alternate;
    display: none;
}

.boss-hud-container {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    background: rgba(0,0,0,0.6);
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #7b2ff7;
    z-index: 500;
    text-align: center;
}

.boss-name {
    color: #e0a7ff;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.boss-hp-bg {
    width: 100%;
    height: 12px;
    background: #222;
    border-radius: 6px;
    overflow: hidden;
}

.boss-hp-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #7b2ff7, #ff4444);
    box-shadow: 0 0 10px #7b2ff7;
    transition: width 0.3s;
}