/* ═══════════════════════════════════════════════
   FREEDOOM — Main Poster Page
   Полноэкранный постер в стиле Doom 1993
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
    --font-doom: 'Share Tech Mono', monospace;
}

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

html, body {
    width: 100%; height: 100%;
    overflow: hidden;       /* ПОСТЕР = ОДИН ЭКРАН, без скролла */
    background: #000;
    font-family: var(--font-doom);
    cursor: crosshair;
}

/* ══════════════════════════════════════
   ПОСТЕР — 100vw × 100vh, всё внутри
══════════════════════════════════════ */
.poster-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #0a0005;
}

/* ── НЕБО АДА — верхние 60% ── */
.hell-sky {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 62%;
    background:
        radial-gradient(ellipse 70% 50% at 50% 20%, #5a0000 0%, #330000 40%, #1a0008 70%, #080003 100%);
    overflow: hidden;
}
.hell-sky::before {   /* горизонт */
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 45%;
    background: linear-gradient(to top, #bb3300 0%, #661100 40%, transparent 100%);
    opacity: 0.55;
}
.hell-sky::after {    /* звёзды-угли */
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 70%;
    background-image:
        radial-gradient(1px 1px at  8% 12%, #ff7700 0%, transparent 100%),
        radial-gradient(1px 1px at 18%  6%, #ff4400 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 18%, #ffbb00 0%, transparent 100%),
        radial-gradient(1px 1px at 45%  4%, #ff6600 0%, transparent 100%),
        radial-gradient(2px 2px at 55% 22%, #ff3300 0%, transparent 100%),
        radial-gradient(1px 1px at 68% 10%, #ff8800 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 16%, #ffcc00 0%, transparent 100%),
        radial-gradient(1px 1px at 90%  7%, #ff5500 0%, transparent 100%),
        radial-gradient(2px 2px at 22% 32%, #ff2200 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 28%, #ffaa00 0%, transparent 100%);
    animation: emberTwinkle 3s ease-in-out infinite alternate;
}
@keyframes emberTwinkle {
    0%   { opacity: 0.35; }
    100% { opacity: 1.0;  }
}

/* Кровавая луна */
.moon {
    position: absolute;
    top: 7%; right: 10%;
    width: clamp(60px, 8vw, 100px);
    height: clamp(60px, 8vw, 100px);
    background: radial-gradient(circle at 35% 35%, #ff6633, #cc2200, #880000);
    border-radius: 50%;
    box-shadow: 0 0 30px #ff4400, 0 0 70px #aa2200, 0 0 120px #660000;
    animation: moonPulse 4s ease-in-out infinite;
}
.moon::before {
    content: '';
    position: absolute;
    top: 18%; left: 14%;
    width: 28%; height: 24%;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
}
.moon::after {
    content: '';
    position: absolute;
    top: 52%; left: 54%;
    width: 20%; height: 18%;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
}
@keyframes moonPulse {
    0%,100% { box-shadow: 0 0 30px #ff4400, 0 0 70px #aa2200; }
    50%      { box-shadow: 0 0 55px #ff6600, 0 0 100px #cc3300, 0 0 150px #770000; }
}

/* Летящие демоны */
.demon-fly {
    position: absolute;
    color: #440011;
    opacity: 0.75;
    animation: demonFly linear infinite;
    filter: drop-shadow(0 0 5px #ff2200);
    user-select: none;
}
.d1 { top: 22%; font-size: clamp(12px,2vw,20px); animation-duration: 18s; }
.d2 { top: 38%; font-size: clamp( 8px,1.2vw,13px); animation-duration: 25s; animation-delay: 7s; }
.d3 { top: 14%; font-size: clamp(16px,2.5vw,26px); animation-duration: 32s; animation-delay: 14s; }
@keyframes demonFly {
    0%   { left: -6%;  transform: scaleX(1)  rotate(-4deg); }
    49%  { transform:  scaleX(1)  rotate(4deg); }
    50%  { left: 106%; transform: scaleX(-1) rotate(-4deg); }
    99%  { transform:  scaleX(-1) rotate(4deg); }
    100% { left: -6%;  transform: scaleX(1)  rotate(-4deg); }
}

/* ── ЗЕМЛЯ АДА — нижние 38% ── */
.hellscape {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 40%;
    background: linear-gradient(to bottom, #160004 0%, #080002 100%);
    border-top: 2px solid #660000;
    overflow: hidden;
}
.hellscape::before {   /* трещины */
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image:
        linear-gradient(135deg, transparent 49%, #440000 49%, #440000 50.5%, transparent 50.5%),
        linear-gradient( 45deg, transparent 49%, #330000 49%, #330000 50.5%, transparent 50.5%);
    background-size: 90px 90px, 65px 65px;
    opacity: 0.25;
}
.hellscape::after {    /* лава снизу */
    content: '';
    position: absolute;
    bottom: 0; left: 5%;
    width: 90%; height: 5px;
    background: linear-gradient(to right, transparent, #ff4400, #ff6600, #ff4400, transparent);
    box-shadow: 0 0 18px #ff4400;
    animation: lavaGlow 2s ease-in-out infinite alternate;
}
@keyframes lavaGlow {
    0%   { opacity: 0.6; width: 80%; left: 10%; }
    100% { opacity: 1.0; width: 92%; left: 4%; }
}

/* Горы силуэты */
.mountains {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}
.mountains svg { width: 100%; height: 100%; }

/* Кучи черепов */
.skull-pile {
    position: absolute;
    bottom: 8%;
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    width: clamp(80px, 15vw, 180px);
}
.skull-pile.left  { left: 3%; }
.skull-pile.right { right: 3%; }
.skull {
    font-size: clamp(14px, 2.5vw, 28px);
    opacity: 0.85;
    filter: sepia(0.4) saturate(0.7);
    animation: skullBob 3s ease-in-out infinite;
}
.skull:nth-child(even) { animation-delay: 0.5s; animation-direction: reverse; }
@keyframes skullBob {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

/* ── DOOMGUY — по центру, стоит на земле ── */
.doomguy-container {
    position: absolute;
    bottom: 36%;   /* стоит чётко на линии земли */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}
.doomguy-svg {
    width: clamp(140px, 22vw, 280px);
    height: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 25px #ff4400) drop-shadow(0 8px 15px rgba(0,0,0,0.9));
    animation: doomguyBreath 2.2s ease-in-out infinite;
}
@keyframes doomguyBreath {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}
.demon-dead {
    width: clamp(120px, 18vw, 220px);
    height: auto;
    image-rendering: pixelated;
    margin-top: -15px;
}
.muzzle-flash {
    animation: muzzleFlicker 0.12s steps(2) infinite;
}
@keyframes muzzleFlicker {
    0%,100% { opacity: 0.95; }
    50%      { opacity: 0.2; }
}

/* ══════════════════════════════════════
   ЛОГОТИП — по центру сверху
══════════════════════════════════════ */
.logo-container {
    position: absolute;
    top: 3%;
    left: 0; right: 0;
    text-align: center;
    z-index: 20;
    pointer-events: none;
    line-height: 1;
}
.logo-free {
    display: block;
    font-size: clamp(2.5rem, 7vw, 6.5rem);
    font-weight: 900;
    color: #ff4400;
    letter-spacing: 0.2em;
    text-shadow:
        0 0 10px #ff6600,
        0 0 30px #ff2200,
        0 0 70px #880000,
        3px 3px 0 #550000,
        6px 6px 0 #330000;
    animation: logoFlicker 6s ease-in-out infinite;
}
.logo-doom {
    display: block;
    font-size: clamp(5rem, 16vw, 14rem);
    font-weight: 900;
    color: #dd0000;
    letter-spacing: 0.06em;
    text-shadow:
        0 0 20px #ff4400,
        0 0 60px #cc0000,
        0 0 120px #880000,
        5px 5px 0 #660000,
        10px 10px 0 #330000;
    line-height: 0.85;
    animation: logoFlicker 6s ease-in-out infinite 0.4s;
}
.logo-subtitle {
    display: block;
    font-size: clamp(0.55rem, 1.5vw, 1rem);
    color: #ff9944;
    letter-spacing: 0.35em;
    text-shadow: 0 0 8px #ff4400;
    margin-top: 6px;
    animation: subtitleBlink 3.5s step-end infinite;
}
@keyframes subtitleBlink {
    0%,88%,100% { opacity: 1; }
    90%,98%     { opacity: 0.3; }
}
@keyframes logoFlicker {
    0%,88%,100% {
        text-shadow:
            0 0 20px #ff4400, 0 0 60px #cc0000,
            0 0 120px #880000, 5px 5px 0 #660000, 10px 10px 0 #330000;
    }
    90% {
        text-shadow: 0 0 5px #ff2200, 5px 5px 0 #440000;
    }
    91% {
        text-shadow:
            0 0 30px #ff6600, 0 0 80px #dd0000,
            0 0 150px #990000, 5px 5px 0 #660000, 10px 10px 0 #330000;
    }
}

/* ══════════════════════════════════════
   КНОПКА ИГРАТЬ — чуть ниже центра
══════════════════════════════════════ */
.play-area {
    position: absolute;
    bottom: 13%;         /* чуть ниже центра — над землёй */
    left: 0; right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 30;
}
.play-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    font-family: var(--font-doom);
}
.play-btn-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 52px;
    background: linear-gradient(135deg, #880000, #cc0000, #880000);
    border: 3px solid #ff4400;
    border-radius: 3px;
    font-size: clamp(1.3rem, 3.5vw, 2.2rem);
    font-weight: 900;
    letter-spacing: 0.3em;
    color: #fff;
    text-shadow: 0 0 10px #ff6600, 2px 2px 0 #330000;
    box-shadow:
        0 0 20px #cc0000,
        0 0 50px #880000,
        inset 0 0 20px rgba(255,80,0,0.15);
    transition: all 0.12s ease;
}
.play-btn:hover .play-btn-inner {
    background: linear-gradient(135deg, #aa0000, #ff2200, #aa0000);
    border-color: #ffbb00;
    color: #ffff00;
    text-shadow: 0 0 20px #ffaa00, 0 0 50px #ff4400, 2px 2px 0 #330000;
    box-shadow:
        0 0 35px #ff4400,
        0 0 70px #cc0000,
        inset 0 0 30px rgba(255,130,0,0.25);
    transform: scale(1.06);
}
.play-btn:active .play-btn-inner {
    transform: scale(0.97);
}
.btn-skull {
    font-size: 1.4em;
    animation: skullRock 2.2s ease-in-out infinite;
}
.btn-skull:last-child { animation-direction: reverse; }
@keyframes skullRock {
    0%,100% { transform: rotate(0deg) scale(1); }
    25%      { transform: rotate(-10deg) scale(1.1); }
    75%      { transform: rotate(10deg) scale(0.9); }
}
.press-hint {
    font-size: clamp(0.55rem, 1.2vw, 0.75rem);
    color: #553322;
    letter-spacing: 0.2em;
    animation: hintBlink 1.5s step-end infinite;
}
@keyframes hintBlink {
    0%,55%,100% { opacity: 1; }
    56%,99%     { opacity: 0; }
}

/* ══════════════════════════════════════
   HUD строка — над кнопкой
══════════════════════════════════════ */
.hud-bar {
    position: absolute;
    bottom: calc(13% + 90px);   /* над кнопкой */
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: clamp(20px, 5vw, 60px);
    padding: 6px 0;
    border-top: 1px solid #330000;
    border-bottom: 1px solid #330000;
    background: rgba(5,0,2,0.7);
    z-index: 25;
}
.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.hud-label {
    font-size: clamp(0.45rem, 1vw, 0.65rem);
    color: #664433;
    letter-spacing: 0.2em;
}
.hud-value {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #ffcc00;
    text-shadow: 0 0 6px #ff8800;
}
.hud-value.red { color: #ff3300; text-shadow: 0 0 6px #cc0000; }

/* ══════════════════════════════════════
   Нижняя строка
══════════════════════════════════════ */
.bottom-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 6px 20px;
    background: rgba(3,0,1,0.9);
    border-top: 1px solid #280000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 25;
}
.bottom-text {
    font-size: clamp(0.45rem, 1vw, 0.62rem);
    color: #3a1a0a;
    letter-spacing: 0.12em;
}
.pentagram {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #550000;
    text-shadow: 0 0 8px #cc0000;
    animation: pentaSpin 10s linear infinite;
}
@keyframes pentaSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ══════════════════════════════════════
   СКАНЛАЙНЫ
══════════════════════════════════════ */
.scanlines {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 500;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.12) 2px,
        rgba(0,0,0,0.12) 4px
    );
}

/* ══════════════════════════════════════
   КАПЛИ КРОВИ
══════════════════════════════════════ */
.blood-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 490;
    overflow: hidden;
}
.blood-drop {
    position: absolute;
    top: -20px;
    width: 3px;
    background: linear-gradient(to bottom, #990000, #cc0000, #660000);
    border-radius: 0 0 4px 4px;
    animation: bloodFall linear infinite;
}
@keyframes bloodFall {
    0%   { transform: translateY(0); opacity: 0.8; }
    100% { transform: translateY(110vh); opacity: 0; }
}

/* ══════════════════════════════════════
   ОГОНЬ (canvas)
══════════════════════════════════════ */
.fire-canvas {
    position: absolute;
    bottom: 24px;  /* над bottom-bar */
    left: 0;
    width: 100%;
    height: clamp(80px, 12vh, 150px);
    pointer-events: none;
    z-index: 20;
    image-rendering: pixelated;
}

/* ══════════════════════════════════════
   МОЛНИИ
══════════════════════════════════════ */
.lightning-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 62%;
    pointer-events: none;
    z-index: 15;
}

/* ══════════════════════════════════════
   Адаптив
══════════════════════════════════════ */
@media (max-width: 600px) {
    .moon { width: 50px; height: 50px; }
    .play-btn-inner { padding: 12px 28px; gap: 10px; }
    .hud-bar { bottom: calc(13% + 70px); }
    .doomguy-container { bottom: 34%; }
}
@media (max-height: 600px) {
    .logo-free { font-size: 2rem; }
    .logo-doom { font-size: 4.5rem; }
    .doomguy-svg { width: 120px; }
    .play-area { bottom: 8%; }
    .hud-bar { display: none; }
    .doomguy-container { bottom: 32%; }
}
