/*
Theme Name: VYKOUP!L&Co - Digitrony & Ohňostroj
Author: VYKOUP!L&Co
Description: Úvodní stránka s názvem firmy, fotkou stavby, odpočtem v podobě svítících digitronů (Nixie), hořící zápalnou šňůrou a ohňostrojem 31. 1. 2027 v 11:45.
Version: 1.0
*/

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #111316;
  color: #f3f4f6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 14px;
  text-align: center;
  overflow-x: hidden;
}

#fireworks-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

.wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 840px;
}

.brand {
  font-size: clamp(2.1rem, 6vw, 3.7rem);
  font-weight: 900;
  letter-spacing: 1px;
  color: #e86c1f;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-shadow: 0 0 24px rgba(232, 108, 31, 0.35);
}

.brand span {
  color: #f3f4f6;
  font-size: clamp(1.3rem, 3.8vw, 2.2rem);
  font-weight: 700;
  text-transform: none;
}

.subtitle {
  color: #9ca3af;
  font-size: 0.9rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.image-box {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2b3038;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  margin-bottom: 28px;
}

.image-box img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

.countdown-label {
  color: #ff8c38;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

/* DIGITRONY (NIXIE TUBES) */
.nixie-rack {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(8px, 2vw, 18px);
  flex-wrap: wrap;
  background: linear-gradient(180deg, #1b1e23 0%, #14161a 100%);
  border: 1px solid #2e333b;
  border-radius: 12px;
  padding: 20px 16px 14px;
  box-shadow: inset 0 2px 10px rgba(255,255,255,0.04), 0 12px 30px rgba(0,0,0,0.6);
  max-width: 680px;
  margin: 0 auto 24px;
}

.nixie-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nixie-digits {
  display: flex;
  gap: 5px;
}

.nixie-tube {
  position: relative;
  width: clamp(34px, 7.5vw, 52px);
  height: clamp(58px, 12vw, 84px);
  background: radial-gradient(ellipse at center, rgba(255, 105, 15, 0.22) 0%, rgba(25, 18, 15, 0.92) 72%, #0c0d10 100%);
  border: 1px solid rgba(255, 160, 90, 0.28);
  border-radius: 26px 26px 6px 6px;
  box-shadow:
    inset 0 0 14px rgba(255, 110, 20, 0.25),
    inset 2px 0 6px rgba(255, 255, 255, 0.14),
    0 0 16px rgba(255, 95, 10, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Jemná drátěná mřížka uvnitř digitronu */
.nixie-tube::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.45) 1px, transparent 1px);
  background-size: 4px 4px;
  pointer-events: none;
  z-index: 2;
}

/* Skleněný odlesk */
.nixie-tube::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 5px;
  width: 5px;
  height: 68%;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0));
  border-radius: 4px;
  pointer-events: none;
  z-index: 3;
}

.nixie-num {
  position: relative;
  z-index: 1;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 700;
  color: #ff8c24;
  text-shadow:
    0 0 6px #ff6a00,
    0 0 14px #ff5500,
    0 0 26px rgba(255, 80, 0, 0.85);
  animation: nixieFlicker 4s infinite alternate;
}

@keyframes nixieFlicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.92; }
  98% { opacity: 0.98; }
}

.nixie-base {
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, #272b33, #434954, #272b33);
  border-radius: 0 0 4px 4px;
  margin-top: 2px;
}

.nixie-label {
  font-size: 0.7rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 7px;
  font-weight: 600;
}

/* HOŘÍCÍ ZÁPALNÁ ŠŇŮRA */
.fuse-section {
  max-width: 680px;
  margin: 0 auto;
  padding: 10px 6px 4px;
}

.fuse-track {
  position: relative;
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
}

/* Nespálený zbytek šňůry */
.fuse-cord {
  position: relative;
  width: 100%;
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    #6b5b4b,
    #6b5b4b 5px,
    #4a3e33 5px,
    #4a3e33 10px
  );
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* Již ohořelá část (popel) */
.fuse-burned {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: #1a1c20;
  border-radius: 4px 0 0 4px;
  transition: width 0.5s linear;
}

/* Hořící jiskřící konec šňůry */
.fuse-spark {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #ffdd55 35%, #ff6a00 70%, transparent 100%);
  box-shadow:
    0 0 12px #ffae00,
    0 0 24px #ff5500,
    0 0 36px #ff2200;
  animation: sparkPulse 0.14s infinite alternate;
  z-index: 5;
}

.fuse-spark::before,
.fuse-spark::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff3a1;
  border-radius: 50%;
  box-shadow: 0 0 6px #ff8800;
}

.fuse-spark::before {
  animation: flySpark1 0.45s infinite ease-out;
}

.fuse-spark::after {
  animation: flySpark2 0.55s infinite ease-out;
}

@keyframes sparkPulse {
  from { transform: translate(-50%, -50%) scale(0.85); }
  to   { transform: translate(-50%, -50%) scale(1.25); }
}

@keyframes flySpark1 {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(-18px, -16px) scale(0.2); opacity: 0; }
}

@keyframes flySpark2 {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(-12px, 15px) scale(0.2); opacity: 0; }
}

/* Rozbuška / patrona na konci šňůry */
.detonator {
  margin-left: 8px;
  padding: 4px 9px;
  background: linear-gradient(180deg, #d9531e, #9c330c);
  border: 1px solid #ff8c42;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(232, 108, 31, 0.35);
}

.launch-banner {
  display: none;
  margin-top: 18px;
  padding: 14px 20px;
  background: rgba(232, 108, 31, 0.16);
  border: 1px solid #e86c1f;
  border-radius: 8px;
  color: #ffbe85;
  font-weight: 700;
  font-size: 1.05rem;
}

.test-btn {
  margin-top: 22px;
  background: transparent;
  border: 1px solid #2e333b;
  color: #6b7280;
  font-size: 0.72rem;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.test-btn:hover {
  border-color: #e86c1f;
  color: #e86c1f;
}
