/* ============================================
   Cennet — Valentine's Day Website
   Modern, romantic dark theme
   ============================================ */

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

:root {
  /* Romantic color palette */
  --bg-deep: #0d0610;
  --bg-surface: #1a0f20;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);

  --pink-soft: #f2a0c4;
  --pink-vivid: #e84393;
  --pink-glow: rgba(232, 67, 147, 0.3);
  --rose: #fd79a8;
  --rose-deep: #c0392b;
  --purple-soft: #a29bfe;
  --purple-deep: #6c5ce7;
  --gold: #f6d365;
  --gold-soft: rgba(246, 211, 101, 0.15);

  --text-primary: #f5f0f7;
  --text-secondary: rgba(245, 240, 247, 0.6);
  --text-muted: rgba(245, 240, 247, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============ SCREENS ============ */

.screen {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  z-index: 1;
}
.screen.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

/* ============ PIN SCREEN ============ */

.pin-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(232, 67, 147, 0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(108, 92, 231, 0.1) 0%, transparent 50%),
              var(--bg-deep);
  z-index: 0;
}

.floating-hearts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.floating-heart {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0;
  animation: floatHeart linear infinite;
  will-change: transform, opacity;
}

@keyframes floatHeart {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0.5) rotate(0deg);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) scale(1.2) rotate(30deg);
  }
}

.pin-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
}

.pin-logo {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  animation: pulseHeart 2s ease-in-out infinite;
}

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

.pin-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
}

.pin-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 2rem;
  font-style: italic;
}

.pin-dots {
  display: flex;
  gap: 14px;
  margin-bottom: 1rem;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: all var(--transition-spring);
  background: transparent;
}

.dot.filled {
  background: var(--pink-vivid);
  border-color: var(--pink-vivid);
  box-shadow: 0 0 12px var(--pink-glow);
  transform: scale(1.15);
}

.dot.error {
  border-color: #e74c3c;
  background: #e74c3c;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.pin-error {
  height: 1.2rem;
  font-size: 0.8rem;
  color: #e74c3c;
  margin-bottom: 0.5rem;
  transition: opacity var(--transition-fast);
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 74px);
  gap: 12px;
}

.pin-key {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 1.5rem;
  font-family: var(--font-body);
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.pin-key:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.pin-key:active {
  transform: scale(0.95);
  background: var(--pink-glow);
}

.pin-key-empty {
  border: none;
  background: none;
  cursor: default;
  pointer-events: none;
}

.pin-key-delete {
  color: var(--text-secondary);
}

.pin-key-delete:hover {
  color: var(--rose);
}

/* ============ MAIN HEADER ============ */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(13, 6, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-logo {
  font-size: 1.4rem;
}

.header-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn-notification {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-notification:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-notification.subscribed {
  border-color: var(--pink-vivid);
  color: var(--pink-vivid);
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink-vivid);
  border: 2px solid var(--bg-deep);
}

.btn-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* ============ CAROUSEL ============ */

.carousel-wrapper {
  position: relative;
  height: 100%;
  padding-top: 60px;
  overflow: hidden;
}

.carousel {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slide-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.55);
  transition: transform 8s ease;
}

.carousel-slide.active .slide-image {
  transform: scale(1.05);
}

.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 680px;
  animation: fadeUpIn 0.8s ease both;
}

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

.slide-counter {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pink-soft);
  margin-bottom: 1rem;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(232, 67, 147, 0.15);
  border: 1px solid rgba(232, 67, 147, 0.2);
}

.slide-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.slide-description {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  font-style: italic;
}

/* Carousel Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 20;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-btn-prev { left: 1rem; }
.carousel-btn-next { right: 1rem; }

/* Carousel Dots */
.carousel-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: none;
}

.carousel-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--pink-vivid);
  box-shadow: 0 0 10px var(--pink-glow);
}

/* ============ ADMIN ============ */

.admin-header {
  background: rgba(13, 6, 16, 0.92);
}

.admin-content {
  padding: 80px 1.5rem 2rem;
  max-width: 600px;
  margin: 0 auto;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition-fast);
}

.admin-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.admin-card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.admin-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--pink-vivid);
  box-shadow: 0 0 0 3px var(--pink-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.btn-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--pink-vivid), var(--purple-deep));
  color: white;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 67, 147, 0.3);
}

.btn-send:active {
  transform: translateY(0);
}

.btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.admin-result {
  font-size: 0.85rem;
  min-height: 1.2rem;
  text-align: center;
  transition: opacity var(--transition-fast);
}

.admin-result.success { color: #2ecc71; }
.admin-result.error { color: #e74c3c; }

/* Template buttons */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.template-btn {
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.template-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--pink-glow);
}

/* ============ NOTIFICATION PERMISSION TOAST ============ */

.notif-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(30, 20, 40, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  max-width: 380px;
  width: calc(100% - 3rem);
  z-index: 200;
  transition: transform var(--transition-spring);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.notif-toast.visible {
  transform: translateX(-50%) translateY(0);
}

.notif-toast h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.notif-toast p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.toast-buttons {
  display: flex;
  gap: 0.5rem;
}

.toast-btn-primary {
  flex: 1;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--pink-vivid), var(--rose));
  color: white;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toast-btn-primary:hover {
  transform: scale(1.02);
}

.toast-btn-secondary {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toast-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ============ SCROLL BAR ============ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============ RESPONSIVE ============ */

@media (max-width: 480px) {
  .pin-pad {
    grid-template-columns: repeat(3, 64px);
    gap: 10px;
  }

  .pin-key {
    width: 64px;
    height: 64px;
    font-size: 1.3rem;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .carousel-btn-prev { left: 0.5rem; }
  .carousel-btn-next { right: 0.5rem; }

  .template-grid {
    grid-template-columns: 1fr;
  }
}
