:root {
  --ink: #4a2340;
  --ink-soft: #7a4a68;
  --pink: #f4a7c1;
  --pink-deep: #e87aa0;
  --pink-hot: #d94d7a;
  --blush: #ff6b9d;
  --blush-deep: #e84a82;
  --cream-rose: #fff0f5;
  --mist: #ffe4ef;
  --gold: #e8a0b5;
  --gold-soft: #f7c4d4;
  --white: #fff7fa;
  --ok: #c2185b;
  --err: #c62828;
  --shadow: 0 18px 50px rgba(232, 122, 160, 0.22);
  --radius: 18px;
  --font-display: "Cormorant Infant", Georgia, serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
}

.hidden {
  display: none !important;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 8% -8%, rgba(255, 107, 157, 0.35), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(244, 167, 193, 0.45), transparent 50%),
    radial-gradient(800px 500px at 50% 100%, rgba(232, 122, 160, 0.2), transparent 55%),
    linear-gradient(165deg, #fff5f8 0%, #ffe8f0 40%, #ffd6e7 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    radial-gradient(rgba(232, 74, 130, 0.07) 0.8px, transparent 0.8px);
  background-size: 16px 16px;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.hero {
  text-align: center;
  animation: rise 0.9s ease both;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.8rem, 9vw, 4.6rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--ink);
}

.brand .heart {
  display: inline-block;
  color: var(--blush);
  margin: 0 0.15em;
  font-size: 0.92em;
  transform-origin: center;
  animation: heartbeat 2.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(232, 74, 130, 0.35));
}

.dates {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 1.1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dates span {
  position: relative;
}

.dates span + span::before {
  content: "·";
  position: absolute;
  left: -0.75rem;
  color: var(--pink-deep);
}

.lead {
  margin: 1.5rem auto 0;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.55;
  animation: rise 1s ease 0.1s both;
}

.panel {
  margin-top: 2rem;
  background: color-mix(in srgb, var(--white) 90%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(232, 122, 160, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  animation: rise 1s ease 0.18s both;
}

.step-title {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--ink);
}

.event-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.event-card {
  appearance: none;
  border: 1.5px solid rgba(232, 122, 160, 0.35);
  background: linear-gradient(180deg, #fff 0%, #ffeaf2 100%);
  border-radius: 14px;
  padding: 1.15rem 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  font: inherit;
  color: inherit;
}

.event-card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 74, 130, 0.65);
}

.event-card.active {
  border-color: var(--blush-deep);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.25);
  background: linear-gradient(180deg, #fff 0%, #ffd6e7 100%);
}

.event-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--blush-deep);
}

.event-card small {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.auth-row,
.upload-row {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

label {
  display: block;
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

input[type="password"],
input[type="text"] {
  width: 100%;
  border: 1.5px solid rgba(232, 122, 160, 0.35);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: var(--blush);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.18);
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blush) 0%, var(--blush-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(232, 74, 130, 0.32);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.03);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-soft);
  border: 1px solid rgba(232, 122, 160, 0.35);
}

.dropzone {
  margin-top: 1rem;
  border: 1.5px dashed rgba(232, 122, 160, 0.75);
  border-radius: 14px;
  padding: 1.6rem 1rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 234, 242, 0.95));
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--blush-deep);
  background: #fff0f6;
  transform: translateY(-1px);
}

.dropzone.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.dropzone strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
  color: var(--blush-deep);
}

.dropzone p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.hidden-input {
  display: none;
}

.queue {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

.item {
  border: 1px solid rgba(232, 122, 160, 0.22);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #fff;
  animation: rise 0.35s ease both;
}

.item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.item-name {
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-all;
}

.item-meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.bar {
  margin-top: 0.55rem;
  height: 8px;
  border-radius: 999px;
  background: #f8d7e4;
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--blush-deep));
  transition: width 0.15s linear;
}

.item.done .bar > i {
  background: linear-gradient(90deg, #f48fb1, #c2185b);
}

.item.error .bar > i {
  background: var(--err);
  width: 100% !important;
}

.status-text {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.item.done .status-text {
  color: var(--ok);
  font-weight: 600;
}

.item.error .status-text {
  color: var(--err);
  font-weight: 600;
}

.toast {
  margin-top: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
  display: none;
}

.toast.show {
  display: block;
  animation: rise 0.3s ease both;
}

.toast.ok {
  background: rgba(194, 24, 91, 0.1);
  color: var(--ok);
  border: 1px solid rgba(194, 24, 91, 0.25);
}

.toast.err {
  background: rgba(198, 40, 40, 0.08);
  color: var(--err);
  border: 1px solid rgba(198, 40, 40, 0.22);
}

.footer-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 122, 160, 0.55);
}

.footer-links a:hover {
  color: var(--blush-deep);
}

.admin-wrap {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  position: relative;
  z-index: 1;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.admin-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 500;
  color: var(--ink);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tab {
  border: 1px solid rgba(232, 122, 160, 0.35);
  background: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  font: inherit;
  color: var(--ink-soft);
}

.tab.active {
  background: linear-gradient(135deg, var(--blush), var(--blush-deep));
  color: #fff;
  border-color: transparent;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}

.gallery-card {
  background: #fff;
  border: 1px solid rgba(232, 122, 160, 0.25);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(232, 122, 160, 0.12);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.gallery-media {
  aspect-ratio: 1;
  background: linear-gradient(180deg, #ffeaf2, #fff5f8);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gallery-media img,
.gallery-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-media .file-icon {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--blush-deep);
  text-align: center;
  padding: 1rem;
  word-break: break-word;
}

.gallery-meta {
  padding: 0.65rem 0.75rem 0.8rem;
  display: grid;
  gap: 0.35rem;
}

.gallery-meta .name {
  font-size: 0.8rem;
  font-weight: 500;
  word-break: break-all;
  line-height: 1.3;
}

.gallery-meta .sub {
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.gallery-actions {
  display: flex;
  gap: 0.4rem;
}

.gallery-actions a,
.gallery-actions button {
  flex: 1;
  text-align: center;
  text-decoration: none;
  font-size: 0.78rem;
  padding: 0.4rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blush), var(--blush-deep));
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font: inherit;
}

.gallery-actions .btn-danger,
.btn-danger {
  background: linear-gradient(135deg, #ef5350, #c62828);
  color: #fff;
  box-shadow: none;
}

.gallery-card:focus-visible {
  outline: 3px solid rgba(232, 74, 130, 0.45);
  outline-offset: 2px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.lightbox.hidden {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 18, 36, 0.82);
  backdrop-filter: blur(6px);
}

.lightbox-stage {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: calc(100vh - 2rem);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.75rem;
}

.lightbox-media {
  min-height: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 182, 205, 0.25);
}

.lightbox-media img,
.lightbox-media video {
  max-width: 100%;
  max-height: min(72vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  background: #1a0f16;
}

.lightbox-media .lb-file {
  color: #ffe4ef;
  font-family: var(--font-display);
  font-size: 1.4rem;
  padding: 2rem;
  text-align: center;
}

.lightbox-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(255, 247, 250, 0.95);
  border: 1px solid rgba(232, 122, 160, 0.35);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
}

.lightbox-info {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.lightbox-info strong {
  font-size: 0.95rem;
  word-break: break-all;
  color: var(--ink);
}

.lightbox-info span {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.lightbox-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lightbox-actions .btn {
  padding: 0.55rem 0.95rem;
  text-decoration: none;
}

.lb-btn {
  position: absolute;
  z-index: 2;
  appearance: none;
  border: none;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 247, 250, 0.92);
  color: var(--blush-deep);
  font-size: 1.8rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background 0.15s ease;
}

.lb-btn:hover {
  transform: scale(1.05);
  background: #fff;
}

.lb-close {
  top: 1rem;
  right: 1rem;
  font-size: 1.6rem;
}

.lb-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev:hover,
.lb-next:hover {
  transform: translateY(-50%) scale(1.05);
}

body.lb-open {
  overflow: hidden;
}

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--ink-soft);
  background: #fff;
  border-radius: 14px;
  border: 1px dashed rgba(232, 122, 160, 0.35);
}

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

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.18);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.12);
  }
  56% {
    transform: scale(1);
  }
}

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

  .page {
    padding-top: 1.75rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .lb-prev,
  .lb-next {
    width: 42px;
    height: 42px;
    font-size: 1.5rem;
  }

  .lb-prev {
    left: 0.4rem;
  }

  .lb-next {
    right: 0.4rem;
  }

  .lightbox-media img,
  .lightbox-media video {
    max-height: min(58vh, 820px);
  }
}
