:root {
  --bg: #0b0b16;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.82);
  --muted-soft: rgba(255, 255, 255, 0.6);
  --accent-1: #ff7eb3;
  --accent-2: #8a7bff;
  --accent-3: #55c7ff;
  --accent-4: #ffd66b;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-strong: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-border-strong: rgba(255, 255, 255, 0.32);
  --danger: #ff8da1;
  --success: #9ef0c6;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 10px 40px rgba(138, 123, 255, 0.25);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}

/* === Animated aurora background === */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 10% 10%, rgba(138, 123, 255, 0.25), transparent 60%),
    radial-gradient(1000px 700px at 90% 20%, rgba(255, 126, 179, 0.22), transparent 60%),
    radial-gradient(900px 700px at 50% 100%, rgba(85, 199, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #0a0917 0%, #0b0b16 50%, #0a0712 100%);
}

.blob {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  mix-blend-mode: screen;
  animation: float 22s ease-in-out infinite;
  will-change: transform;
}

.blob-1 { background: #8a7bff; top: -120px; left: -80px; animation-delay: 0s; }
.blob-2 { background: #ff7eb3; top: 20%; right: -140px; animation-delay: -6s; }
.blob-3 { background: #55c7ff; bottom: -140px; left: 15%; animation-delay: -12s; }
.blob-4 { background: #ffd66b; bottom: 10%; right: 20%; width: 380px; height: 380px; opacity: 0.32; animation-delay: -18s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(60px, -40px) scale(1.08); }
  50% { transform: translate(-40px, 50px) scale(0.95); }
  75% { transform: translate(30px, 30px) scale(1.05); }
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='1'/></svg>");
}

/* === Glass base === */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* === Layout === */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* === Hero === */
.hero {
  padding: 36px 32px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #78e6b4;
  box-shadow: 0 0 0 4px rgba(120, 230, 180, 0.22);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gradient-text {
  position: relative;
  display: inline-block;
  padding: 2px 18px;
  margin-left: 4px;
  background: linear-gradient(135deg, rgba(255, 126, 179, 0.35) 0%, rgba(138, 123, 255, 0.4) 50%, rgba(85, 199, 255, 0.35) 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  color: #fff;
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 8px 32px rgba(138, 123, 255, 0.35);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
}

.subtitle {
  color: #fff;
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 26px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.stat {
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 18px rgba(138, 123, 255, 0.55);
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
  opacity: 0.85;
}

/* === Card / form === */
.card {
  padding: 28px;
}

.card h2,
.list-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 0.82rem;
  color: #fff;
  font-weight: 500;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .row { grid-template-columns: 1fr; }
}

input, textarea {
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
  width: 100%;
}

input::placeholder, textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

input:focus, textarea:focus {
  border-color: var(--glass-border-strong);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(138, 123, 255, 0.18);
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hint {
  font-size: 0.8rem;
  color: #fff;
  opacity: 0.8;
}

kbd {
  font-family: inherit;
  font-size: 0.72rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
}

/* === Buttons === */
.btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  padding: 11px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #ff7eb3 0%, #8a7bff 100%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(138, 123, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 14px 38px rgba(138, 123, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--glass-border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--glass-border-strong);
}

.btn-ghost.is-reserved {
  background: rgba(120, 230, 180, 0.18);
  border-color: rgba(120, 230, 180, 0.5);
  color: #caf7e1;
}

.btn-icon {
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border);
  border-radius: 12px;
  color: #fff;
}

.btn-icon:hover {
  color: var(--danger);
  background: rgba(255, 107, 139, 0.12);
  border-color: rgba(255, 107, 139, 0.4);
}

/* === List === */
.list-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  gap: 12px;
  flex-wrap: wrap;
}

.list-header h2 { margin: 0; }

.filters {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.chip {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
  opacity: 0.75;
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.chip:hover { opacity: 1; }
.chip.active { opacity: 1; }

.chip.active {
  background: linear-gradient(135deg, rgba(255, 126, 179, 0.3), rgba(138, 123, 255, 0.3));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.wish-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wish {
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  animation: slideIn 0.35s ease both;
}

.wish:hover {
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
}

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

.wish-main {
  flex: 1;
  min-width: 0;
}

.wish-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wish-title {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.wish.reserved .wish-title {
  text-decoration: line-through;
  text-decoration-color: rgba(158, 240, 198, 0.7);
  text-decoration-thickness: 2px;
  color: #fff;
  opacity: 0.75;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(158, 240, 198, 0.22);
  color: #fff;
  border: 1px solid rgba(158, 240, 198, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wish-note {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: #fff;
  opacity: 0.88;
  white-space: pre-wrap;
  word-break: break-word;
}

.wish-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #fff;
  flex-wrap: wrap;
}

.wish-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  text-decoration: none;
  padding: 3px 10px;
  background: rgba(138, 123, 255, 0.22);
  border: 1px solid rgba(138, 123, 255, 0.45);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.wish-link:hover {
  background: rgba(138, 123, 255, 0.28);
}

.wish-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

@media (max-width: 520px) {
  .wish { flex-direction: column; }
  .wish-actions { width: 100%; }
  .btn-reserve { flex: 1; justify-content: center; }
}

.btn-reserve {
  font-size: 0.85rem;
  padding: 8px 14px;
}

/* === File upload === */
.file-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px dashed var(--glass-border-strong);
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.file-drop:hover,
.file-drop.drag-over {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
}

.file-drop-text { font-size: 0.9rem; }

.image-preview {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.image-preview .thumb {
  position: relative;
  padding-top: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
}

.image-preview .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview .thumb .remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.image-preview .thumb .remove:hover {
  background: rgba(255, 139, 161, 0.85);
}

/* === Wish gallery === */
.wish-gallery {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.wish-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  cursor: zoom-in;
  transition: transform 0.15s ease, border-color 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
}

.wish-gallery img:hover {
  transform: scale(1.02);
  border-color: var(--glass-border-strong);
}

/* === Lightbox === */
.lightbox {
  padding: 0;
  background: transparent;
  border: none;
  max-width: 96vw;
  max-height: 96vh;
  width: auto;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(5, 5, 15, 0.85);
  backdrop-filter: blur(10px);
}

.lightbox img {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  border-radius: 18px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #0b0b16;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Empty / status === */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: #fff;
}

.empty-emoji {
  font-size: 2.6rem;
  margin-bottom: 8px;
}

.status-msg {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 107, 139, 0.12);
  border: 1px solid rgba(255, 107, 139, 0.3);
  color: #ffd4dd;
  font-size: 0.9rem;
}

.status-msg.info {
  background: rgba(138, 123, 255, 0.14);
  border-color: rgba(138, 123, 255, 0.3);
  color: #dcd6ff;
}

/* === Footer === */
.footer {
  text-align: center;
  color: #fff;
  opacity: 0.85;
  font-size: 0.82rem;
  padding: 20px 0 0;
}

.footer a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.footer a:hover { opacity: 1; }

/* === Dialog === */
dialog {
  color: var(--text);
  padding: 28px;
  max-width: 420px;
  width: calc(100% - 40px);
  border: 1px solid var(--glass-border-strong);
  animation: fadeIn 0.25s ease;
}

dialog::backdrop {
  background: rgba(5, 5, 15, 0.55);
  backdrop-filter: blur(8px);
}

.info-dialog h3 { margin-top: 0; color: #fff; }
.info-dialog ul { padding-left: 20px; color: #fff; line-height: 1.7; }
.info-dialog form { margin-top: 18px; text-align: right; }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
