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

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0b0b0b 0%, #1d0000 45%, #100808 100%);
  color: white;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* Tela de login */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 50, 50, 0.25), rgba(0, 0, 0, 0.9)),
    linear-gradient(135deg, #121212 0%, #180000 100%);
  z-index: 100;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.login-screen.is-hiding {
  opacity: 0;
  visibility: hidden;
}

.login-container {
  width: min(90vw, 440px);
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 0, 0, 0.7);
  border-radius: 24px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-heart {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: pulseHeart 1.6s ease-in-out infinite;
}

@keyframes pulseHeart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.login-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #ff3a3a;
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.5);
}

.login-subtitle {
  color: #e7dede;
  margin-bottom: 24px;
  font-size: 1rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.password-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 80, 80, 0.7);
  background: rgba(0, 0, 0, 0.35);
  color: white;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.password-input:focus {
  border-color: #ff4d4d;
  box-shadow: 0 0 14px rgba(255, 60, 60, 0.5);
  transform: translateY(-2px);
}

.login-button {
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff2f2f 0%, #8d0000 100%);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.35);
}

.login-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.5);
}

.login-button:active {
  transform: translateY(-1px) scale(0.98);
}

.login-error {
  margin-top: 14px;
  color: #ff7b7b;
  font-weight: bold;
  text-align: center;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* Conteúdo principal */
.main-content {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
  animation: fadeInContent 0.8s ease;
}

@keyframes fadeInContent {
  from { opacity: 0; }
  to { opacity: 1; }
}

.container {
  width: min(100%, 1100px);
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 40px 20px 60px;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: #ff4a4a;
  text-shadow: 0 0 18px rgba(255, 80, 80, 0.45);
  margin-bottom: 28px;
  animation: glowText 2s ease-in-out infinite;
}

@keyframes glowText {
  0%, 100% {
    text-shadow: 0 0 16px rgba(255, 80, 80, 0.55);
  }
  50% {
    text-shadow: 0 0 28px rgba(255, 0, 0, 0.9);
  }
}

/* Botão */
.button-container {
  margin-bottom: 26px;
}

.magic-button {
  padding: 16px 46px;
  border: 2px solid rgba(255, 0, 0, 0.8);
  border-radius: 50px;
  background: linear-gradient(135deg, #ff2020 0%, #8d0000 100%);
  color: white;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 0 22px rgba(255, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.magic-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 2.8s linear infinite;
}

@keyframes shine {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.magic-button:hover {
  transform: scale(1.04);
  box-shadow: 0 0 32px rgba(255, 0, 0, 0.6);
}

.magic-button:active {
  transform: scale(0.96);
}

/* Contadores */
.timer-container {
  max-width: 880px;
  margin: 22px auto 0;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 80, 80, 0.7);
  border-radius: 24px;
  padding: 26px 14px 18px;
  box-shadow: 0 0 20px rgba(255, 40, 40, 0.25);
  animation: slideInUp 0.8s ease forwards;
}

.timer-container:nth-child(2) {
  animation-delay: 0.1s;
}

.timer-container:nth-child(3) {
  animation-delay: 0.2s;
}

.timer-container:nth-child(4) {
  animation-delay: 0.3s;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timer-title {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: #ff4545;
  margin-bottom: 18px;
  letter-spacing: 0.8px;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.4);
}

.timer-box {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 14px;
}

.time-unit {
  border: 1px solid rgba(255, 70, 70, 0.7);
  background: linear-gradient(135deg, rgba(60, 0, 0, 0.7), rgba(15,15,15,0.9));
  border-radius: 16px;
  padding: 18px 10px;
  box-shadow: inset 0 0 12px rgba(255, 0, 0, 0.09);
  animation: flicker 2.2s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.time-unit:hover {
  transform: scale(1.05);
}

@keyframes flicker {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 60, 60, 0.2); }
  50% { box-shadow: 0 0 18px rgba(255, 60, 60, 0.55); }
}

.time-number {
  font-size: clamp(1.7rem, 2.5vw, 2.7rem);
  color: #ff4a4a;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.time-label {
  margin-top: 8px;
  color: #e7dada;
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Coração central */
.heart-container {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 3;
}

.heart {
  width: clamp(150px, 25vw, 230px);
  height: clamp(150px, 25vw, 230px);
  opacity: 0;
  animation: heartAppear 1.2s ease-out forwards;
}

@keyframes heartAppear {
  0% {
    transform: scale(0.2) rotate(-10deg);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.heart svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #ff2020;
  stroke-width: 4;
  filter: drop-shadow(0 0 18px rgba(255, 0, 0, 0.7));
  animation: heartBeat 1s ease-in-out infinite;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Floating hearts no fundo */
.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-heart {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0.1;
  animation: floatUp 18s infinite ease-in;
}

.float-heart svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgba(255, 0, 0, 0.7);
  stroke-width: 2;
}

@keyframes floatUp {
  0% {
    transform: translateY(110vh) scale(0.5);
    opacity: 0;
  }
  20% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(-20vh) scale(1.2);
    opacity: 0;
  }
}

/* Mobile responsivo */
@media (max-width: 768px) {
  .login-container {
    padding: 28px 18px;
  }

  .container {
    padding-top: 30px;
  }

  .timer-box {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  .time-unit {
    padding: 14px 8px;
  }

  .time-number {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }

  .time-label {
    font-size: 0.72rem;
  }

  .magic-button {
    padding: 14px 34px;
    font-size: 0.95rem;
  }
}

@media (max-width: 420px) {
  .login-button,
  .password-input {
    font-size: 0.95rem;
  }

  .timer-box {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
    gap: 10px;
  }

  .timer-container {
    padding-left: 10px;
    padding-right: 10px;
  }
}
