@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --ink: #12070c;
  --ink-soft: #1d0b13;
  --panel: rgba(31, 13, 21, .82);
  --panel-solid: #24101a;
  --line: rgba(255, 124, 153, .22);
  --line-strong: rgba(255, 124, 153, .52);
  --red: #e33157;
  --red-bright: #ff5578;
  --rose: #ff9cb0;
  --cream: #fff4f2;
  --muted: #c29ba6;
  --quiet: #8e6875;
  --shadow: 0 24px 80px rgba(0, 0, 0, .48), 0 0 70px rgba(171, 23, 61, .16);
}

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

html { min-height: 100%; }

body {
  min-height: 100vh;
  color: var(--cream);
  background: var(--ink);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, rgba(18, 7, 12, .93), rgba(31, 5, 16, .74)), url('/images/velvet-romance-bg.png') center / cover;
  content: '';
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .18;
  background-image: radial-gradient(rgba(255,255,255,.18) .6px, transparent .6px);
  background-size: 5px 5px;
  content: '';
  pointer-events: none;
}

a { color: inherit; }

h1, h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; letter-spacing: -.035em; }

.eyebrow {
  color: var(--rose);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.card, .form-card, .confirmed-card {
  position: relative;
  width: min(92%, 520px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(46, 19, 31, .9), rgba(20, 8, 14, .86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card::before, .form-card::before, .confirmed-card::before {
  position: absolute;
  top: 0;
  right: 14%;
  left: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-bright), transparent);
  content: '';
}

/* Home */
body:has(.card) { display: grid; place-items: center; padding: 24px; }

.card { padding: clamp(42px, 8vw, 76px) clamp(28px, 8vw, 62px); text-align: center; }

.hearts { margin-bottom: 26px; color: var(--red-bright); font-size: 1.25rem; letter-spacing: .7em; filter: drop-shadow(0 0 12px rgba(255, 65, 102, .8)); animation: pulse 2.8s ease-in-out infinite; }

@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.08); opacity: 1; } }

.card h1 { max-width: 390px; margin: 14px auto 16px; color: var(--cream); font-size: clamp(2.25rem, 6vw, 3.5rem); line-height: 1.08; }

.sub, .form-card p, .confirmed-card p { color: var(--muted); line-height: 1.7; }
.sub { max-width: 330px; margin: 0 auto 34px; }

.btn-yes, .btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red-bright), var(--red));
  color: white;
  font: 700 1rem 'DM Sans', sans-serif;
  box-shadow: 0 12px 30px rgba(198, 28, 69, .34), inset 0 1px rgba(255,255,255,.25);
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.btn-yes { min-width: 190px; padding: 16px 28px; }
.btn-submit { width: 100%; padding: 16px 22px; }
.btn-yes:hover, .btn-submit:hover { transform: translateY(-3px); filter: brightness(1.08); box-shadow: 0 16px 38px rgba(224, 42, 82, .45); }

.btn-no { position: fixed; border: 1px solid var(--line-strong); border-radius: 14px; padding: 11px 22px; background: rgba(27, 11, 18, .9); color: var(--rose); font: 600 .9rem 'DM Sans', sans-serif; cursor: pointer; transition: background .2s, color .2s; }
.btn-no:hover { background: var(--red); color: white; }

/* Calendar and food */
.page-wrap { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 100vh; padding: 32px 16px; }
.form-card { padding: clamp(30px, 6vw, 52px) clamp(22px, 6vw, 46px); text-align: center; }
.form-card > .page-icon { margin-bottom: 16px; color: var(--red-bright); font-size: 2.2rem; filter: drop-shadow(0 0 14px rgba(255, 65, 102, .5)); }
.form-card h2 { margin-bottom: 10px; color: var(--cream); font-size: clamp(1.9rem, 5vw, 2.45rem); }
.form-card p { margin-bottom: 28px; font-size: .94rem; }
.form-card p strong { color: var(--rose); }

#persian-calendar { direction: rtl; margin-bottom: 24px; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding: 0 2px; }
.cal-header button { width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(255,255,255,.03); color: var(--rose); font-size: 1.35rem; line-height: 1; cursor: pointer; transition: background .2s, transform .2s; }
.cal-header button:hover { background: var(--red); transform: scale(1.08); }
.cal-header span { color: var(--cream); font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-grid .day-name { padding: 5px 0 9px; color: var(--quiet); font-size: .7rem; font-weight: 700; }
.cal-grid .day { padding: 10px 4px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); font-size: .88rem; cursor: pointer; transition: background .2s, color .2s, border .2s; }
.cal-grid .day:hover { border-color: var(--line); background: rgba(227, 49, 87, .16); color: var(--cream); }
.cal-grid .day.selected { background: linear-gradient(135deg, var(--red-bright), var(--red)); color: white; font-weight: 700; box-shadow: 0 5px 16px rgba(227,49,87,.32); }
.cal-grid .day.empty { cursor: default; }

.time-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 22px 0 28px; }
.time-row label { color: var(--muted); font-size: .9rem; }
.time-row input[type='time'] { min-width: 132px; border: 1px solid var(--line-strong); border-radius: 11px; padding: 11px 13px; outline: none; background: rgba(255,255,255,.04); color: var(--cream); font: 600 .95rem 'DM Sans', sans-serif; color-scheme: dark; }
.time-row input[type='time']:focus { border-color: var(--red-bright); box-shadow: 0 0 0 3px rgba(255,85,120,.14); }

.food-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 28px; }
.food-option { position: absolute; opacity: 0; pointer-events: none; }
.food-label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 118px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.025); color: var(--muted); cursor: pointer; font-size: .88rem; transition: border .2s, background .2s, transform .2s, color .2s; }
.food-label span.emoji { font-size: 2rem; filter: saturate(.8); }
.food-label:hover { border-color: var(--line-strong); background: rgba(227,49,87,.12); transform: translateY(-2px); }
.food-option:focus-visible + .food-label { outline: 2px solid var(--rose); outline-offset: 3px; }
.food-option:checked + .food-label { border-color: var(--red-bright); background: linear-gradient(145deg, rgba(227,49,87,.3), rgba(93,14,34,.34)); color: var(--cream); box-shadow: 0 8px 25px rgba(227,49,87,.2), inset 0 0 0 1px rgba(255,156,176,.1); }

/* Confirmation */
.confirmed-card { padding: clamp(40px, 8vw, 68px) clamp(26px, 7vw, 52px); text-align: center; }
.confirmed-card .big-emoji { margin-bottom: 16px; font-size: 3.8rem; filter: drop-shadow(0 0 18px rgba(255, 65, 102, .65)); }
.confirmed-card h2 { color: var(--cream); font-size: clamp(2.2rem, 7vw, 3rem); }
.confirmed-card .detail { margin-top: 26px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 17px; background: rgba(7, 3, 6, .32); color: var(--muted); line-height: 2; }
.confirmed-card .detail strong { color: var(--rose); }
.confirmed-card .footer-note { margin-top: 24px; font-size: .88rem; }

/* Admin */
.admin-page { display: block; padding: 42px 20px; }
.admin-wrap { max-width: 900px; margin: 0 auto; }
.admin-header { margin-bottom: 34px; text-align: center; }
.admin-header h1 { color: var(--cream); font-size: clamp(2rem, 5vw, 2.8rem); }
.admin-header p { margin-top: 8px; color: var(--muted); }
.badge, .record-num { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--red); color: white; font: 700 .8rem 'DM Sans', sans-serif; }
.badge { min-width: 32px; padding: 5px 11px; vertical-align: middle; }
.empty, .record-card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(46,19,31,.88), rgba(20,8,14,.86)); box-shadow: 0 12px 40px rgba(0,0,0,.24); }
.empty { border-radius: 22px; padding: 60px 30px; color: var(--muted); text-align: center; }
.record-card { display: grid; grid-template-columns: 44px repeat(3, 1fr) 1.4fr; align-items: center; gap: 18px; margin-bottom: 13px; padding: 19px 22px; border-radius: 17px; }
.record-num { width: 34px; height: 34px; }
.record-field label { display: block; margin-bottom: 5px; color: var(--quiet); font-size: .66rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.record-field span { color: var(--cream); font-size: .92rem; font-weight: 600; }
.record-field .food-pill { display: inline-block; padding: 4px 11px; border-radius: 999px; background: rgba(227,49,87,.18); color: var(--rose); font-size: .8rem; }
.ts span { color: var(--muted); font-size: .8rem; font-weight: 400; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

@media (max-width: 680px) {
  .record-card { grid-template-columns: 40px 1fr 1fr; }
  .record-card .ts { grid-column: 2 / -1; }
  .record-card .record-field:nth-child(4) { grid-column: 2 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
