:root {
  color-scheme: dark;
  --bg: #07020b;
  --bg-2: #10051b;
  --panel: rgba(18, 7, 29, 0.76);
  --panel-strong: rgba(10, 4, 18, 0.92);
  --line: rgba(183, 118, 255, 0.32);
  --line-hot: rgba(210, 159, 255, 0.72);
  --violet: #9c4dff;
  --violet-hot: #c98cff;
  --lavender: #d9c4ff;
  --muted: #a894bb;
  --white: #fff8ff;
  --danger: #ff7ca8;
  --success: #b994ff;
  --radius: 8px;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 50% -10%, rgba(130, 57, 255, 0.26), transparent 38rem),
    radial-gradient(circle at 88% 8%, rgba(192, 94, 255, 0.12), transparent 25rem),
    linear-gradient(180deg, #09020f 0%, var(--bg) 45%, #050108 100%);
  font-family: "Avenir Next", "Trebuchet MS", "Gill Sans", sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    repeating-radial-gradient(circle at 18% 27%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 72px);
  opacity: 0.13;
  mix-blend-mode: screen;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 8px, 8px 100%;
  opacity: 0.18;
  mask-image: linear-gradient(to bottom, black 0%, transparent 72%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  width: 100%;
  min-height: 100vh;
}

.hero {
  position: relative;
  display: grid;
  min-height: 58vh;
  padding: 4.5rem 1.15rem 2.75rem;
  overflow: hidden;
  place-items: center;
}

.hero-grid {
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background:
    linear-gradient(rgba(190, 91, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 91, 255, 0.14) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.35;
  transform: perspective(420px) rotateX(60deg) translateY(18%);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, black, transparent 74%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  text-align: center;
}

.kicker,
.section-tag {
  margin: 0;
  color: var(--violet-hot);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.neon-title {
  position: relative;
  margin: 0 auto;
  color: #fff6ff;
  font-family: "Bodoni 72", Didot, Georgia, serif;
  font-size: clamp(3.1rem, 6.5vw, 6rem);
  font-weight: 900;
  letter-spacing: clamp(0.06em, 0.85vw, 0.12em);
  line-height: 0.88;
  text-transform: uppercase;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.9),
    0 0 14px rgba(191, 112, 255, 0.92),
    0 0 36px rgba(134, 50, 255, 0.78),
    0 0 74px rgba(112, 32, 214, 0.55);
}

.neon-title::after {
  position: absolute;
  inset: 54% 0 auto;
  z-index: -1;
  height: 0.18em;
  content: "";
  background: rgba(166, 64, 255, 0.14);
  filter: blur(18px);
}

.hero-line {
  max-width: 720px;
  margin: 1.35rem auto 0;
  color: var(--lavender);
  font-size: clamp(1rem, 2.7vw, 1.22rem);
  letter-spacing: 0.02em;
}

.neon-rule {
  width: min(420px, 72vw);
  height: 1px;
  margin: 1.35rem auto 1rem;
  background: linear-gradient(90deg, transparent, var(--violet-hot), transparent);
  box-shadow: 0 0 16px rgba(190, 91, 255, 0.85);
}

.hero-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  letter-spacing: 0.16em;
  text-transform: lowercase;
}

.hero-button,
.upload-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line-hot);
  border-radius: var(--radius);
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(154, 70, 255, 0.32), rgba(61, 20, 99, 0.44)),
    rgba(13, 4, 23, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 0 22px rgba(156, 77, 255, 0.2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: lowercase;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.hero-button {
  min-width: 190px;
  margin-top: 1.4rem;
}

.hero-button:hover,
.upload-button:hover:not(:disabled),
.ghost-button:hover {
  border-color: #f0d9ff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 28px rgba(190, 91, 255, 0.34);
  transform: translateY(-1px);
}

.hero-small {
  max-width: 620px;
  margin: 1.1rem auto 0;
  color: rgba(217, 196, 255, 0.74);
  font-size: 0.88rem;
}

main {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.upload-section,
.board-section {
  position: relative;
  padding: 2.75rem 0 0;
}

.section-copy {
  max-width: 660px;
  margin-bottom: 1.25rem;
  text-align: center;
  margin-inline: auto;
}

.section-copy h2,
.board-heading h2 {
  margin: 0.35rem 0 0;
  font-family: "Bodoni 72", Didot, Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: lowercase;
}

.section-copy p:not(.section-tag),
.board-heading p:not(.section-tag) {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.upload-console {
  display: grid;
  gap: 1rem;
  max-width: 980px;
  margin-inline: auto;
  padding: 0.65rem;
  border: 1px solid rgba(183, 118, 255, 0.24);
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 38%),
    rgba(8, 2, 13, 0.76);
}

.drop-zone {
  position: relative;
  display: grid;
  min-height: 210px;
  padding: 2rem 1.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 0%, rgba(153, 66, 255, 0.14), transparent 65%),
    linear-gradient(180deg, rgba(20, 8, 33, 0.92), rgba(8, 2, 13, 0.94));
  place-items: center;
  text-align: center;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-zone.dragging,
.drop-zone:hover {
  border-color: var(--line-hot);
  box-shadow: 0 0 28px rgba(156, 77, 255, 0.18);
}

.drop-zone.dragging {
  transform: scale(0.995);
}

.drop-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(199, 141, 255, 0.28);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(154, 70, 255, 0.2), transparent 62%);
  filter: blur(0.2px);
}

.drop-main,
.drop-sub,
.selected-count {
  position: relative;
}

.drop-main {
  color: var(--white);
  font-family: "Bodoni 72", Didot, Georgia, serif;
  font-size: clamp(2rem, 9vw, 3.7rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 0 22px rgba(190, 91, 255, 0.46);
}

.drop-sub {
  margin-top: 0.45rem;
  color: var(--lavender);
  font-size: 1rem;
}

.selected-count {
  margin-top: 1.6rem;
  color: rgba(217, 196, 255, 0.72);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.upload-side {
  display: grid;
  align-content: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(183, 118, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(7, 2, 12, 0.78);
}

.turnstile-box {
  min-height: 65px;
}

.upload-button {
  width: 100%;
}

.upload-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.progress-shell {
  height: 6px;
  overflow: hidden;
  border: 1px solid rgba(183, 118, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #6a2cff, #d7a0ff);
  box-shadow: 0 0 14px rgba(190, 91, 255, 0.8);
  transition: width 140ms ease;
}

.upload-message {
  min-height: 1.2rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.upload-message.error {
  color: var(--danger);
}

.upload-message.success {
  color: var(--success);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.8rem;
  max-width: 980px;
  margin-inline: auto;
}

.preview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(183, 118, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(8, 2, 13, 0.88);
  aspect-ratio: 1;
}

.preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.preview-card span {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  padding: 0.24rem 0.38rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  color: var(--lavender);
  background: rgba(4, 1, 8, 0.74);
  font-size: 0.68rem;
}

.preview-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  color: var(--muted);
  place-items: center;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.board-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  text-align: center;
}

.board-heading > div {
  flex: 1;
}

.ghost-button {
  min-width: 136px;
  min-height: 40px;
  padding: 0 1rem;
  background: rgba(11, 3, 19, 0.72);
}

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  justify-content: center;
}

.photo-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(183, 118, 255, 0.19);
  border-radius: var(--radius);
  background: var(--panel-strong);
  transform: translateZ(0);
  transition: border-color 180ms ease, filter 180ms ease;
}

.photo-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background: linear-gradient(to top, rgba(4, 1, 8, 0.38), transparent 44%);
}

.photo-card img {
  display: block;
  width: 100%;
  min-height: 260px;
  height: auto;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.035);
  filter: saturate(0.98) brightness(0.9);
  transition: filter 180ms ease, transform 220ms ease;
}

@media (hover: hover) {
  .photo-card:hover {
    border-color: rgba(217, 196, 255, 0.62);
    filter: drop-shadow(0 0 14px rgba(156, 77, 255, 0.18));
  }

  .photo-card:hover img {
    filter: saturate(1.04) brightness(1.04);
    transform: scale(1.012);
  }

  .photo-card:hover .like-button {
    opacity: 1;
  }
}

.like-button {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(217, 196, 255, 0.16);
  border-radius: 6px;
  color: var(--lavender);
  background: rgba(5, 1, 10, 0.72);
  backdrop-filter: blur(10px);
}

.like-button {
  right: 0.45rem;
  bottom: 0.45rem;
  min-height: 34px;
  padding: 0 0.62rem;
  opacity: 0.84;
  transition: opacity 160ms ease, border-color 160ms ease, color 160ms ease;
}

.like-button.active {
  color: #fff8ff;
  border-color: rgba(217, 196, 255, 0.52);
  text-shadow: 0 0 12px rgba(190, 91, 255, 0.74);
}

.like-button:disabled {
  cursor: default;
}

.empty-state,
.skeleton-card {
  display: inline-grid;
  width: 100%;
  margin-bottom: 1rem;
  border: 1px solid rgba(183, 118, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.025), rgba(198, 132, 255, 0.12), rgba(255, 255, 255, 0.025)),
    rgba(8, 2, 13, 0.92);
}

.skeleton-card {
  min-height: 320px;
  animation: pulse 1.3s ease-in-out infinite;
}

.empty-state {
  min-height: 240px;
  padding: 2rem;
  color: var(--muted);
  place-items: center;
  text-align: center;
}

.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 4rem auto 0;
  padding: 2rem 0 2.5rem;
  color: rgba(217, 196, 255, 0.62);
  font-size: 0.88rem;
  text-align: center;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.admin-page {
  width: min(1120px, calc(100% - 2rem));
  padding: 3rem 0;
}

.admin-panel {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
}

.admin-panel h1 {
  margin: 0.35rem 0 0;
  font-family: "Bodoni 72", Didot, Georgia, serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: 0.04em;
}

.admin-panel p:not(.section-tag) {
  color: var(--muted);
}

.admin-form {
  display: grid;
  gap: 0.75rem;
  max-width: 520px;
  margin: 1.4rem auto 0;
}

.admin-form input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--white);
  background: rgba(7, 2, 12, 0.86);
  padding: 0 0.9rem;
  outline: none;
}

.admin-form input:focus {
  border-color: var(--line-hot);
  box-shadow: 0 0 18px rgba(156, 77, 255, 0.18);
}

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

.admin-card {
  display: grid;
  gap: 0.7rem;
  border: 1px solid rgba(183, 118, 255, 0.2);
  border-radius: var(--radius);
  background: var(--panel-strong);
  padding: 0.6rem;
}

.admin-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.admin-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.delete-button {
  min-height: 38px;
  border: 1px solid rgba(255, 124, 168, 0.52);
  border-radius: 6px;
  color: var(--white);
  background: rgba(68, 9, 30, 0.8);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.48;
  }

  50% {
    opacity: 0.82;
  }
}

@media (min-width: 640px) {
  main {
    width: min(var(--max), calc(100% - 3rem));
  }

  .preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-form {
    grid-template-columns: minmax(0, 1fr) 150px;
  }

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

  .photo-card,
  .empty-state,
  .skeleton-card {
    margin-bottom: 1rem;
  }
}

@media (min-width: 700px) {
  .board-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 420px));
  }
}

@media (min-width: 760px) {
  .neon-title {
    white-space: nowrap;
  }
}

@media (min-width: 900px) {
  .hero {
    padding-top: 5.4rem;
  }

  .upload-console {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .drop-zone {
    min-height: 260px;
  }

  .preview-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .board-grid {
    grid-template-columns: repeat(auto-fit, minmax(330px, 420px));
    gap: 1.1rem;
  }

  .admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1500px) {
  .board-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 430px));
  }
}

@media (max-width: 620px) {
  .board-heading {
    display: grid;
    gap: 1rem;
  }

  .ghost-button {
    width: 100%;
    margin-top: 1rem;
  }

}

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