:root {
  --rose-deep: #9b1b3a;
  --rose: #c9184a;
  --blush: #ff758f;
  --petal: #ffb3c1;
  --cream: #fff5f7;
  --ink: #4a1020;
  --soft-white: rgba(255, 255, 255, 0.92);
  --font-display: "Amiri", "Noto Naskh Arabic", serif;
  --font-body: "Cairo", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 117, 143, 0.35), transparent 45%),
    radial-gradient(ellipse at 85% 20%, rgba(201, 24, 74, 0.22), transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 179, 193, 0.45), transparent 50%),
    linear-gradient(165deg, #fff0f3 0%, #ffe0e8 40%, #ffd6e0 100%);
  overflow-x: hidden;
  direction: rtl;
}

/* Floating hearts */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hearts-bg span {
  position: absolute;
  bottom: -40px;
  color: var(--rose);
  opacity: 0.28;
  animation: float-up linear infinite;
  font-size: 1.2rem;
}

.hearts-bg span:nth-child(1) { left: 8%;  animation-duration: 14s; animation-delay: 0s;   font-size: 1rem; }
.hearts-bg span:nth-child(2) { left: 18%; animation-duration: 18s; animation-delay: 2s;   font-size: 1.6rem; color: var(--blush); }
.hearts-bg span:nth-child(3) { left: 30%; animation-duration: 12s; animation-delay: 4s;   font-size: 0.9rem; }
.hearts-bg span:nth-child(4) { left: 45%; animation-duration: 20s; animation-delay: 1s;   font-size: 1.4rem; color: var(--rose-deep); }
.hearts-bg span:nth-child(5) { left: 58%; animation-duration: 15s; animation-delay: 3s;   font-size: 1.1rem; }
.hearts-bg span:nth-child(6) { left: 70%; animation-duration: 17s; animation-delay: 5s;   font-size: 1.8rem; color: var(--blush); }
.hearts-bg span:nth-child(7) { left: 82%; animation-duration: 13s; animation-delay: 0.5s; font-size: 1rem; }
.hearts-bg span:nth-child(8) { left: 92%; animation-duration: 19s; animation-delay: 2.5s; font-size: 1.3rem; }

@keyframes float-up {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% { opacity: 0.35; }
  90% { opacity: 0.2; }
  100% {
    transform: translateY(-110vh) rotate(25deg) scale(1.2);
    opacity: 0;
  }
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

/* ===== Home / Password ===== */
.gate {
  width: min(420px, 100%);
  text-align: center;
  animation: fade-rise 1s ease-out both;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  font-weight: 700;
  color: var(--rose-deep);
  line-height: 1.2;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
  animation: heartbeat 2.4s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.04); }
  28% { transform: scale(1); }
  42% { transform: scale(1.03); }
  70% { transform: scale(1); }
}

.tagline {
  font-size: 1.05rem;
  color: var(--rose);
  margin-bottom: 2rem;
  opacity: 0.9;
}

.gate-form {
  background: var(--soft-white);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(201, 24, 74, 0.15);
  border-radius: 1.5rem;
  padding: 2rem 1.75rem;
  box-shadow: 0 20px 50px rgba(155, 27, 58, 0.12);
}

.gate-form label {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.gate-form input[type="password"] {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border: 2px solid var(--petal);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1.25rem;
  letter-spacing: 0.35em;
  text-align: center;
  color: var(--rose-deep);
  background: #fff;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.gate-form input[type="password"]:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(201, 24, 74, 0.12);
}

.gate-form button {
  margin-top: 1.15rem;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(201, 24, 74, 0.35);
}

.gate-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(201, 24, 74, 0.45);
}

.gate-form button:active {
  transform: translateY(0);
}

.error {
  margin-top: 1rem;
  color: var(--rose-deep);
  font-size: 0.95rem;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.hint {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(74, 16, 32, 0.55);
}

/* ===== Love page ===== */
.love-wrap {
  width: min(880px, 100%);
  padding: 2.5rem 0 4rem;
  animation: fade-rise 0.9s ease-out both;
}

.love-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.love-hero .brand {
  margin-bottom: 0.5rem;
}

.love-hero p {
  font-size: 1.15rem;
  color: var(--rose);
  max-width: 28rem;
  margin: 0 auto;
  line-height: 1.7;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  color: var(--rose-deep);
  text-align: center;
  margin-bottom: 1.5rem;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.message {
  background: var(--soft-white);
  border-right: 4px solid var(--rose);
  border-radius: 0 1rem 1rem 0;
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  line-height: 1.85;
  box-shadow: 0 8px 28px rgba(155, 27, 58, 0.08);
  animation: fade-rise 0.7s ease-out both;
}

.message:nth-child(1) { animation-delay: 0.1s; }
.message:nth-child(2) { animation-delay: 0.2s; }
.message:nth-child(3) { animation-delay: 0.3s; }
.message:nth-child(4) { animation-delay: 0.4s; }
.message:nth-child(5) { animation-delay: 0.5s; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 1.25rem;
  overflow: hidden;
  background: linear-gradient(145deg, var(--petal), var(--rose));
  box-shadow: 0 12px 32px rgba(155, 27, 58, 0.18);
  animation: fade-rise 0.8s ease-out both;
}

.photo:nth-child(1) { animation-delay: 0.15s; }
.photo:nth-child(2) { animation-delay: 0.25s; }
.photo:nth-child(3) { animation-delay: 0.35s; }
.photo:nth-child(4) { animation-delay: 0.45s; }
.photo:nth-child(5) { animation-delay: 0.55s; }

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.photo:hover img {
  transform: scale(1.05);
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #fff;
  text-align: center;
  padding: 1rem;
}

.photo-placeholder .big-heart {
  font-size: 3rem;
  animation: heartbeat 2s ease-in-out infinite;
}

.photo-placeholder span {
  font-size: 0.9rem;
  opacity: 0.9;
}

.footer-note {
  text-align: center;
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--rose-deep);
}

.logout-form {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

.logout-btn {
  padding: 0.65rem 1.5rem;
  border: 1.5px solid rgba(201, 24, 74, 0.35);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rose-deep);
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.logout-btn:hover {
  background: #fff;
  border-color: var(--rose);
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .gate-form {
    padding: 1.5rem 1.25rem;
  }

  .message {
    padding: 1rem 1.15rem;
    font-size: 0.98rem;
  }
}
