/* ===== Into the Limbo — sakura dusk theme ============================== */
:root {
  --ink:      #f4e9ef;
  --ink-dim:  #c9b2c4;
  --sky-top:  #140a24;
  --sky-mid:  #3a1740;
  --sky-low:  #7d2f52;
  --sky-glow: #c85b78;
  --peach:    #f3a9a0;
  --sakura:   #f7b7c9;
  --sakura-deep: #e8829e;
  --plum:     #2a1330;
  --plum-2:   #1a0c22;
  --glass:    rgba(30, 14, 34, 0.55);
  --glass-brd: rgba(247, 183, 201, 0.22);
  --shadow:   0 20px 60px rgba(0, 0, 0, 0.45);
  --radius:   18px;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--plum-2);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* Falling-petal canvas sits above the background, below content */
#petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* ===== Buttons ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .7em 1.4em;
  border-radius: 999px;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn--solid {
  background: linear-gradient(135deg, var(--sakura-deep), var(--peach));
  color: #2a1330;
  box-shadow: 0 8px 24px rgba(232, 130, 158, 0.35);
}
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(232, 130, 158, 0.5); }
.btn--ghost {
  background: rgba(247, 183, 201, 0.08);
  border-color: var(--glass-brd);
  color: var(--ink);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { transform: translateY(-2px); background: rgba(247, 183, 201, 0.16); }
.btn--lg { padding: .9em 1.8em; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ===== Nav ============================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(20, 10, 36, 0.75), rgba(20, 10, 36, 0));
  backdrop-filter: blur(8px);
}
.nav__brand { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: .4rem; }
.nav__mark { font-size: 1.1rem; }
.nav__links { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.4rem); font-size: .95rem; }
.nav__links a:not(.btn):hover { color: var(--sakura); }
.nav__user { color: var(--sakura); font-weight: 500; }

/* ===== Hero ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__scene { position: absolute; inset: 0; z-index: 1; }
.layer { position: absolute; inset: 0; will-change: transform; }
.layer--sky {
  background:
    radial-gradient(120% 90% at 72% 8%, rgba(200, 91, 120, 0.55), transparent 55%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-low) 78%, var(--sky-glow) 100%);
}
.layer--moon { display: flex; justify-content: flex-end; }
.moon {
  width: 160px; height: 160px;
  margin: 9vh 12vw 0 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6f9, #f7d6df 60%, #e8a9bd);
  box-shadow: 0 0 80px 20px rgba(247, 214, 223, 0.45), inset -14px -10px 0 rgba(200, 91, 120, 0.15);
}
.layer--stars {
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 60% 20%, #ffe9f0, transparent),
    radial-gradient(1px 1px at 80% 40%, #fff, transparent),
    radial-gradient(1px 1px at 35% 15%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 48% 45%, #ffe9f0, transparent),
    radial-gradient(1px 1px at 90% 25%, #fff, transparent);
  opacity: .7;
}
.layer--mountains svg { position: absolute; bottom: 0; width: 100%; height: 55%; }
.layer--mountains path { fill: #3d1a3f; opacity: .85; }
.layer--hills svg { position: absolute; bottom: 0; width: 100%; height: 40%; }
.layer--hills path { fill: #24102a; }
.layer--branch svg { position: absolute; bottom: -2px; right: 0; width: min(55vw, 620px); height: auto; }
.blossoms circle { filter: drop-shadow(0 0 4px rgba(247, 183, 201, .7)); }

.hero__copy {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 820px;
}
.hero__eyebrow { text-transform: uppercase; letter-spacing: .35em; font-size: .78rem; color: var(--sakura); margin-bottom: 1rem; padding-left: .35em; }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 12vw, 8rem);
  font-weight: 600;
  line-height: .95;
  letter-spacing: .01em;
  background: linear-gradient(180deg, #fff 0%, var(--sakura) 70%, var(--sakura-deep) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 60px rgba(232, 130, 158, 0.3);
}
.hero__sub { margin: 1.4rem auto 0; max-width: 560px; font-size: clamp(1rem, 2.4vw, 1.2rem); color: var(--ink-dim); font-weight: 300; }
.hero__cta { margin-top: 2.2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  z-index: 4; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-dim);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.hero__scroll span { width: 1px; height: 34px; background: linear-gradient(var(--sakura), transparent); animation: scrolldrop 1.8s ease-in-out infinite; }
@keyframes scrolldrop { 0%, 100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ===== Shared section content over a dark gradient ==================== */
main { position: relative; z-index: 4; }
.has-hero main { background: linear-gradient(180deg, var(--sky-glow) 0%, var(--plum) 12%, var(--plum-2) 40%); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto; padding: clamp(4rem, 10vw, 7rem) 1.5rem 2.5rem; }
.section-head__eyebrow, .dash__eyebrow, .auth__eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: .75rem; color: var(--sakura); margin-bottom: .8rem; }
.section-head__title { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 600; }
.section-head__lead, .dash__lead { color: var(--ink-dim); margin-top: .6rem; font-weight: 300; }

/* ===== Cards =========================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem) 2rem;
}
.card {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .7rem;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(247, 183, 201, 0.5); box-shadow: 0 26px 70px rgba(0,0,0,.5); }
.card__top { display: flex; justify-content: space-between; align-items: center; }
.card__tag { font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--sakura); background: rgba(247,183,201,.1); padding: .25em .7em; border-radius: 999px; }
.card__status { font-size: .72rem; padding: .25em .7em; border-radius: 999px; border: 1px solid var(--glass-brd); color: var(--ink-dim); }
.card__status--live { color: #a7f0c0; border-color: rgba(167,240,192,.4); }
.card__status--in-progress { color: var(--peach); border-color: rgba(243,169,160,.4); }
.card__name { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }
.card__tagline { color: var(--ink-dim); font-size: .95rem; font-weight: 300; flex: 1; }
.card__link { margin-top: .4rem; color: var(--sakura); font-weight: 500; font-size: .92rem; align-self: flex-start; transition: gap .2s ease; display: inline-flex; gap: .35em; }
.card__link:hover { color: #fff; }
.card__link:hover span { transform: translateX(3px); }
.card__link span { transition: transform .2s ease; display: inline-block; }

/* ===== CTA band ======================================================== */
.cta-band { text-align: center; padding: clamp(4rem, 9vw, 7rem) 1.5rem; max-width: 700px; margin: 0 auto; }
.cta-band h2 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; }
.cta-band p { color: var(--ink-dim); margin: .8rem 0 1.8rem; font-weight: 300; }

/* ===== Auth & dashboard backgrounds =================================== */
.has-auth, .has-dash { background: linear-gradient(160deg, var(--sky-top), var(--sky-mid) 55%, var(--sky-low)); }
.has-auth main, .has-dash main { min-height: 100vh; }

.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 6rem 1.5rem 3rem; }
.auth__card {
  width: 100%; max-width: 420px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.auth__title { font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; line-height: 1.1; }
.auth__lead { color: var(--ink-dim); margin: .5rem 0 1.6rem; font-weight: 300; font-size: .95rem; }
.auth__switch { margin-top: 1.4rem; text-align: center; color: var(--ink-dim); font-size: .9rem; }
.auth__switch a { color: var(--sakura); font-weight: 500; }

.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field span { font-size: .85rem; color: var(--ink-dim); letter-spacing: .02em; }
.field input {
  background: rgba(20, 10, 30, 0.6);
  border: 1px solid var(--glass-brd);
  border-radius: 10px;
  padding: .8rem .9rem;
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus { outline: none; border-color: var(--sakura); box-shadow: 0 0 0 3px rgba(247, 183, 201, 0.15); }
.field__hint { color: var(--ink-dim); font-size: .78rem; opacity: .8; }

/* ===== Dashboard ======================================================= */
.dash { padding: 7rem 1rem 3rem; }
.dash__head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.dash__title { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 600; }

/* ===== Admin panel ===================================================== */
.admin-stats {
  display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center;
  max-width: 1100px; margin: 0 auto 1.6rem; padding: 0 1rem;
}
.stat {
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: 999px;
  padding: .45rem 1rem; font-size: .85rem; color: var(--ink-dim); backdrop-filter: blur(8px);
}
.stat b { color: var(--ink); font-weight: 600; margin-right: .15em; }
.stat--pending b { color: var(--peach); }
.stat--approved b { color: #a7f0c0; }
.stat--rejected b { color: #d9b8c6; }
.stat--banned b { color: #ff9ab0; }

.admin-table-wrap {
  max-width: 1100px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem) 2rem;
  overflow-x: auto;
}
.admin-table {
  width: 100%; border-collapse: collapse; min-width: 640px;
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(10px);
}
.admin-table th, .admin-table td {
  text-align: left; padding: .9rem 1rem; border-bottom: 1px solid rgba(247, 183, 201, 0.1);
  vertical-align: middle;
}
.admin-table th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--sakura); font-weight: 600;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(247, 183, 201, 0.04); }
.admin-user { font-weight: 600; }
.admin-email { font-size: .82rem; color: var(--ink-dim); }
.admin-date { font-size: .82rem; color: var(--ink-dim); white-space: nowrap; }
.admin-self { color: var(--ink-dim); font-size: .85rem; font-style: italic; }
.admin-empty { text-align: center; color: var(--ink-dim); padding: 2rem; }
.admin-table__actions { text-align: right; }
.admin-actions { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.admin-actions form { margin: 0; }

.badge {
  display: inline-block; font-size: .72rem; padding: .25em .7em; border-radius: 999px;
  border: 1px solid var(--glass-brd); color: var(--ink-dim); text-transform: capitalize;
}
.badge--admin { color: var(--sakura); border-color: rgba(247,183,201,.5); background: rgba(247,183,201,.08); }
.badge--pending { color: var(--peach); border-color: rgba(243,169,160,.45); }
.badge--approved { color: #a7f0c0; border-color: rgba(167,240,192,.45); }
.badge--rejected { color: #d9b8c6; border-color: rgba(217,184,198,.4); }
.badge--banned { color: #ff9ab0; border-color: rgba(255,154,176,.5); background: rgba(255,154,176,.06); }

.pill-btn {
  cursor: pointer; font-family: inherit; font-size: .8rem; font-weight: 500;
  padding: .4em .9em; border-radius: 999px; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.pill-btn:hover { transform: translateY(-1px); }
.pill-btn--approve { background: rgba(167,240,192,.15); color: #b8f5cd; border-color: rgba(167,240,192,.4); }
.pill-btn--approve:hover { background: rgba(167,240,192,.28); }
.pill-btn--reject { background: rgba(217,184,198,.12); color: #e6cdd8; border-color: rgba(217,184,198,.35); }
.pill-btn--reject:hover { background: rgba(217,184,198,.22); }
.pill-btn--ban { background: rgba(255,154,176,.12); color: #ffb3c4; border-color: rgba(255,154,176,.4); }
.pill-btn--ban:hover { background: rgba(255,154,176,.24); }

/* ===== Flash =========================================================== */
.flash-stack { position: fixed; top: 5rem; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: .6rem; width: min(92vw, 460px); }
.flash { padding: .85rem 1.1rem; border-radius: 12px; font-size: .92rem; backdrop-filter: blur(10px); border: 1px solid; box-shadow: var(--shadow); animation: flashin .4s ease; }
.flash--success { background: rgba(40, 90, 60, 0.6); border-color: rgba(167,240,192,.4); color: #d6ffe6; }
.flash--error { background: rgba(120, 40, 60, 0.6); border-color: rgba(247,150,170,.4); color: #ffdbe4; }
@keyframes flashin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Footer ========================================================== */
.footer { position: relative; z-index: 4; text-align: center; padding: 2.5rem 1.5rem; color: var(--ink-dim); font-size: .9rem; border-top: 1px solid rgba(247, 183, 201, 0.1); }
.footer__dim { opacity: .6; }

/* ===== Reveal animation ================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; transition-delay: calc(var(--i, 0) * 80ms); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .layer { transform: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 560px) {
  .nav__links a:not(.btn) { display: none; }
  .nav__links a[href$="#projects"] { display: none; }
  .moon { width: 110px; height: 110px; }
}
