@font-face {
  font-family: "HetiDurcisFont";
  src: url("font.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ALAP BODY – a konkrét háttér a login-mode / main-mode class-tól függ */
body {
  margin: 0;
  min-height: 100vh;
  font-family: "HetiDurcisFont", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #020617;
  overflow-x: hidden;
}
/* Globális szövegkörvonal */
body, input, button, textarea, select, label, h1, h2, h3, h4, h5, h6, p, div, span {
  text-shadow:
    1px 1px 2px #000,
    -1px 1px 2px #000,
    1px -1px 2px #000,
    -1px -1px 2px #000,
    0 0 4px #000;
}
#loginBtn {
  text-shadow: none;
}

/* Login háttér: hatter2.png + sötétebb overlay */
body.login-mode {
  background: #020617 url("hatter2.png") center/cover fixed no-repeat;
}

/* Belépés utáni háttér: hatter.png + overlay */
body.main-mode {
  background: #020617 url("hatter.png") center/cover fixed no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(32, 47, 82, 0.75);
  backdrop-filter: blur(0px);
  z-index: -2;
}

#app {
  width: 100%;
  max-width: 1080px;
  padding: 16px;
}

.card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 18px;
  padding: 20px 20px 18px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 22px 35px rgba(0, 0, 0, 0.5);
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.login-card {
  max-width: 420px;
  margin: 0 auto;
}

.layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 16px;
}

@media (max-width: 800px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.title {
  text-align: center;
  margin: 0 0 4px;
}

.subtitle {
  text-align: center;
  margin: 0 0 16px;
  color: #e5e7eb;
  font-size: 0.95rem;
}

.muted {
  color: #9ca3af;
}

.hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #9ca3af;
}

.error {
  color: #fca5a5;
  margin-top: 8px;
  min-height: 1.2em;
}

.status {
  margin-top: 8px;
  font-size: 0.9rem;
}

.form-row {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

label {
  font-size: 0.9rem;
  color: #e5e7eb;
}
#giftOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5; /* a doboz mögött lesz, de minden más előtt */
}

#giftOverlay.active {
  opacity: 1;
  pointer-events: all;
}

input[type="text"],
input[type="password"],
input[type="url"],
textarea,
select {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  outline: none;
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.5);
}

.btn {
  border-radius: 999px;
  padding: 8px 16px;
  border: none;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  font-weight: 600;
  width: 100%;
  margin-top: 6px;
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(248, 181, 0, 0.45);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 0.8);
}

.login-hint {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.brand {
  font-weight: 600;
}

.user-info {
  font-size: 0.85rem;
  color: #cbd5f5;
}

/* Naptár */

.calendar {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(60px, 80px));
  gap: 10px;
}

.door {
  font-family: "HetiDurcisFont", sans-serif !important;
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 3.4rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  color: #ffffff; /* ← a számok mostantól tiszta fehérek */

}
/* Ajtó számának dőlöngélése hover esetén */
.door-number {
    display: inline-block;
    transition: transform 0.3s ease;
}

.door.unlocked:hover .door-number {
    animation: number-tilt 1.4s ease-in-out infinite alternate;
}

@keyframes number-tilt {
    0% { transform: rotate(-6deg); }
    100% { transform: rotate(6deg); }
}


.door-label {
  position: absolute;
  bottom: 4px;
  font-size: 0.7rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Hover: fehéres, lüktető fény */
.door.unlocked:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  animation: door-pulse 1.1s ease-in-out infinite alternate;
}

/* lassú lüktetés animáció */
@keyframes door-pulse {
  0% {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.03);
  }
  100% {
    box-shadow: 0 0 22px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.07);
  }
}


.door.locked {
  opacity: 0.35;
  cursor: not-allowed;
}

.door.today {
  border-color: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.8);
}

/* Ajándék */

.gift-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gift-content {
  margin-top: 6px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  min-height: 80px;
}

.gift-content img,
.gift-content video {
  max-width: 100%;
  border-radius: 10px;
}

.gift-media {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Admin */

.admin {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.7);
}

.hidden {
  display: none !important;
}

/* AJÁNDÉK BONTÓ OVERLAY */

.gift-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none; /* csak a box legyen kattintható */
}

.gift-modal {
  position: relative;
  text-align: center;
  pointer-events: auto;
  background: transparent;
  padding: 0;
}

.gift-modal::after {
  /* csillám csak nyitáskor */
  content: "";
  position: absolute;
  inset: -40%;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.9) 0, transparent 55%),
    radial-gradient(circle, rgba(252,211,77,0.9) 0, transparent 60%),
    radial-gradient(circle, rgba(248,113,113,0.8) 0, transparent 60%);
  background-size: 16px 16px, 18px 18px, 20px 20px;
  background-repeat: repeat;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.gift-modal.sparkles::after {
  animation: sparkles 0.7s ease-out forwards;
}

.gift-instruction {
  font-weight: 600;
  margin-bottom: 10px;
  color: #fde68a;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.gift-hint {
  font-size: 0.85rem;
  color: #fee2e2;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  margin-top: 6px;
}

/* Kinyitás utáni eltűnés: közeledik és elhalványul */
.gift-box.vanish {
  animation: gift-vanish 0.9s ease-out forwards;
}

@keyframes gift-vanish {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  70% {
    transform: scale(1.8); /* 1.8× méret → közelítés hatás */
    opacity: 0.5;
  }
  100% {
    transform: scale(2.2); /* végső közelítés */
    opacity: 0;
  }
}



.gift-box-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.gift-box {
  position: relative;
  width: 200px;
  height: 200px;
  cursor: pointer;
  transform-origin: center center;
}


.gift-body {
  position: absolute;
  inset: 40px 0 0 0;
  background: linear-gradient(135deg, #b91c1c, #f97316);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 18px rgba(30, 64, 175, 0.7);
}

.gift-lid {
  position: absolute;
  height: 40px;
  left: -6px;
  right: -6px;
  top: 0;
  background: linear-gradient(135deg, #fecaca, #fed7aa);
  border-radius: 14px 14px 4px 4px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.7);
}

.gift-ribbon-horizontal {
  position: absolute;
  left: 0;
  right: 0;
  top: 54px;
  height: 18px;
  background: linear-gradient(90deg, #facc15, #f97316);
}

.gift-ribbon-vertical {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #facc15, #f97316);
}

/* ütés rázkódás */

.gift-box.shake {
  animation: gift-shake 0.25s ease;
}

@keyframes gift-shake {
  0% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-6px) rotate(-3deg); }
  50% { transform: translateX(6px) rotate(3deg); }
  75% { transform: translateX(-3px) rotate(-2deg); }
  100% { transform: translateX(0) rotate(0); }
}

/* kinyílás */

.gift-box.opened .gift-lid {
  animation: lid-open 0.45s ease-out forwards;
}

@keyframes lid-open {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  60% { transform: translate(-30px, -40px) rotate(-25deg); opacity: 1; }
  100% { transform: translate(-30px, -60px) rotate(-35deg); opacity: 0; }
}

/* HÓ EFFEKT – csak main-mode esetén látszik */

#snowContainer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
  display: none;
}

body.main-mode #snowContainer {
  display: block;
}

.snowflake {
  position: fixed;
  top: -10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.95);
  box-shadow: 0 0 6px rgba(248, 250, 252, 0.8);
  opacity: 0.9;
  animation-name: snow-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes snow-fall {
  0% {
    transform: translate3d(0, -10px, 0);
  }
  100% {
    transform: translate3d(30px, 110vh, 0);
  }
}

/* PARÁZS LOGIN HÁTTÉR – csak login-mode */

/* PARÁZSLÓ PONTOK LOGIN NÉZETBEN */

.embers {
  position: fixed;
  inset: auto 0 0 0;
  height: 50vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

body.login-mode .embers {
  opacity: 1;
}

body.main-mode .embers {
  opacity: 0;
}

.ember-particle {
  position: absolute;
  bottom: -10px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(252, 211, 77, 1) 0%, rgba(248, 113, 113, 0.2) 60%, transparent 70%);
  box-shadow:
    0 0 4px rgba(252, 211, 77, 0.9),
    0 0 10px rgba(248, 113, 113, 0.6);
  opacity: 0;
  animation-name: ember-rise;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes ember-rise {
  0% {
    transform: translateY(0) translateX(0) scale(0.6);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  60% {
    opacity: 0.9;
    transform: translateY(-40vh) translateX(5px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-60vh) translateX(10px) scale(0.8);
  }
}
/* Login kártya elúszik felfelé, közben elhalványul */
.view-fade-out-up {
  animation: viewFadeOutUp 0.55s ease forwards;
}

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

/* Fő nézet finom felbukkanása */
.view-fade-in {
  opacity: 0;
  animation: viewFadeIn 0.6s ease forwards;
}

@keyframes viewFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
body.login-mode.view-transitioning::before {
  background: rgba(15, 23, 42, 0.9);
}
