/* ============================================================
   Titan Palworld portal — original Palworld-inspired styling.
   Palette: sky blue, meadow green, warm sun-gold, soft cream.
   ============================================================ */
:root {
  --sky-top:   #7ec8ff;
  --sky-mid:   #a9dcff;
  --sky-low:   #d7f0ff;
  --meadow:    #6fbf5f;
  --meadow-dk: #4a9e46;
  --meadow-dkr:#3c8a3f;
  --gold:      #ffcb3d;
  --gold-dk:   #f4a623;
  --ink:       #1f3a4d;
  --ink-soft:  #3d5a6c;
  --cream:     #fbfdff;
  --card:      #ffffff;
  --line:      #dcecf5;
  --danger:    #e2564b;
  --discord:   #5865f2;
  --shadow:    0 14px 30px -14px rgba(31,58,77,.35);
  --shadow-sm: 0 6px 16px -8px rgba(31,58,77,.35);
  --radius:    22px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background: var(--sky-low);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}
h1, h2, h3, .brand span { font-family: "Baloo 2", "Nunito", sans-serif; letter-spacing: .2px; }
a { color: var(--meadow-dk); text-decoration: none; }
img { max-width: 100%; }

/* ---------- Fixed sky scenery ---------- */
.scenery { position: fixed; inset: 0; z-index: -2; }
.sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 40%, var(--sky-low) 78%);
}
.hills { position: absolute; bottom: 0; left: 0; width: 100%; height: 46vh; min-height: 320px; }
.hill-1 { fill: var(--meadow); }
.hill-2 { fill: var(--meadow-dk); opacity: .9; }
.hill-3 { fill: var(--meadow-dkr); opacity: .5; }
.clouds { position: absolute; inset: 0; overflow: hidden; }
.cloud {
  position: absolute; display: block;
  background: #fff; border-radius: 100px;
  box-shadow: 40px 12px 0 -6px #fff, 80px 4px 0 -10px #fff, -34px 14px 0 -8px #fff;
  opacity: .85; filter: blur(.3px);
  animation: drift linear infinite;
}
.c1 { width: 120px; height: 42px; top: 12%; left: -15%; animation-duration: 70s; }
.c2 { width: 90px;  height: 34px; top: 24%; left: -15%; animation-duration: 95s; animation-delay: -30s; }
.c3 { width: 150px; height: 52px; top: 8%;  left: -20%; animation-duration: 120s; animation-delay: -60s; opacity: .7; }
@keyframes drift { to { transform: translateX(135vw); } }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 48px);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.25rem; }
.brand img { filter: drop-shadow(0 3px 4px rgba(31,58,77,.25)); }
.nav-links { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 26px); font-weight: 700; }
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--meadow-dk); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Baloo 2", sans-serif; font-weight: 700; font-size: 1rem;
  color: var(--ink); background: var(--gold);
  border: none; border-radius: 999px; padding: 12px 24px; cursor: pointer;
  box-shadow: 0 5px 0 var(--gold-dk), var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--gold-dk), var(--shadow); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gold-dk); }
.btn-lg { padding: 15px 32px; font-size: 1.12rem; }
.btn-sm { padding: 9px 18px; font-size: .92rem; box-shadow: 0 4px 0 var(--gold-dk); }
.btn-block { width: 100%; }
.btn-ghost {
  background: #fff; color: var(--meadow-dk);
  box-shadow: 0 5px 0 var(--line), var(--shadow-sm);
}
.btn-ghost:hover { box-shadow: 0 7px 0 var(--line), var(--shadow); }
.btn-ghost:active { box-shadow: 0 2px 0 var(--line); }
.btn-ok { background: var(--meadow); color: #fff; box-shadow: 0 5px 0 var(--meadow-dkr); }
.btn-no { background: #fff; color: var(--danger); box-shadow: 0 5px 0 var(--line); }
.btn-discord { background: var(--discord); color: #fff; box-shadow: 0 5px 0 #3f4ad1; }
.btn-discord:hover { box-shadow: 0 7px 0 #3f4ad1, var(--shadow); }

/* ---------- Layout ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 32px) 60px; }
body.page-narrow main { max-width: 640px; }
body.page-wide main { max-width: 1000px; }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); text-align: center; margin: 8px 0 28px; }
.section-title.left { text-align: left; }

/* ---------- Flash ---------- */
.flash-wrap { margin: 18px 0; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 700; }
.flash-error { background: #fde8e6; color: #b23a2f; border: 1px solid #f5c4bf; }
.flash-success { background: #e6f6e4; color: #2f7d33; border: 1px solid #bfe6bd; }

/* ---------- Hero ---------- */
.hero { padding: clamp(30px, 6vw, 64px) 0 20px; }
.hero-inner { display: grid; grid-template-columns: 1.25fr .75fr; gap: 24px; align-items: center; }
.eyebrow {
  display: inline-block; background: rgba(255,255,255,.75); color: var(--meadow-dk);
  font-weight: 800; font-size: .82rem; letter-spacing: .6px; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.03; margin: 0 0 16px; color: var(--ink); text-shadow: 0 2px 0 rgba(255,255,255,.6); }
.lede { font-size: clamp(1.05rem, 2.3vw, 1.28rem); color: var(--ink-soft); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 24px 0 14px; }
.hero-note { font-size: .95rem; color: var(--ink-soft); background: rgba(255,255,255,.6); display: inline-block; padding: 8px 14px; border-radius: 999px; }
.hero-art { display: flex; justify-content: center; }
.float-sphere { width: min(320px, 70%); filter: drop-shadow(0 24px 26px rgba(31,58,77,.35)); animation: bob 4.5s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(-8px) rotate(-3deg); } 50% { transform: translateY(10px) rotate(3deg); } }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  background: var(--card); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); margin: 20px 0 44px; border: 1px solid var(--line);
}
.stat { text-align: center; }
.stat-num { display: block; font-family: "Baloo 2"; font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--meadow-dk); line-height: 1; }
.stat-label { font-size: .9rem; color: var(--ink-soft); font-weight: 700; }

/* ---------- Features ---------- */
.features { margin: 40px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-ico {
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.6rem;
  background: linear-gradient(160deg, var(--sky-mid), var(--sky-low));
  border-radius: 16px; margin-bottom: 14px;
}
.card h3 { margin: 0 0 6px; font-size: 1.25rem; }
.card p { margin: 0; color: var(--ink-soft); }

/* ---------- Rules ---------- */
.rules { margin: 50px 0; }
.rules-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 30px; box-shadow: var(--shadow-sm); max-width: 780px; margin: 0 auto;
}
.rules-card ol { padding-left: 22px; }
.rules-card li { margin: 14px 0; color: var(--ink-soft); }
.rules-card strong { color: var(--ink); }

/* ---------- Apply ---------- */
.apply { margin: 50px 0 10px; }
.apply-inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: 30px; align-items: start; }
.apply-copy p { color: var(--ink-soft); }
.apply-steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.apply-steps li { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--ink); }
.apply-steps span {
  flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--gold); color: var(--ink); border-radius: 50%; font-family: "Baloo 2"; box-shadow: 0 3px 0 var(--gold-dk);
}
.apply-form {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: grid; gap: 16px;
}
.apply-form label { display: grid; gap: 6px; font-weight: 700; color: var(--ink); }
.apply-form small { font-weight: 600; color: var(--ink-soft); }
.apply-form .opt, .apply-form .form-fine { color: var(--ink-soft); font-weight: 600; }
.apply-form input, .apply-form select, .apply-form textarea {
  font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream); color: var(--ink); transition: border-color .12s ease, box-shadow .12s ease;
}
.apply-form input:focus, .apply-form select:focus, .apply-form textarea:focus {
  outline: none; border-color: var(--meadow); box-shadow: 0 0 0 4px rgba(111,191,95,.18);
}
.apply-form textarea { resize: vertical; }
.form-fine { text-align: center; font-size: .9rem; margin: 2px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Status page ---------- */
.status-wrap { padding: clamp(24px, 6vw, 56px) 0; }
.status-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 5vw, 40px); box-shadow: var(--shadow); text-align: center;
}
.status-card h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 12px 0 10px; }
.status-card p { color: var(--ink-soft); }
.status-badge {
  display: inline-block; font-weight: 800; font-size: .9rem; letter-spacing: .4px;
  padding: 7px 16px; border-radius: 999px; background: var(--sky-low); color: var(--ink-soft);
}
.status-badge.ok { background: #e6f6e4; color: #2f7d33; }
.status-badge.no { background: #fde8e6; color: #b23a2f; }
.muted { color: var(--ink-soft); font-size: .96rem; }
.muted.center, .center { text-align: center; }

.connect { text-align: left; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 24px 0; }
.connect h2 { margin: 0 0 12px; font-size: 1.3rem; }
.connect-steps { color: var(--ink-soft); padding-left: 20px; margin: 0 0 18px; }
.cred { margin: 12px 0; }
.cred-label { display: block; font-weight: 700; font-size: .85rem; color: var(--ink-soft); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.cred-row { display: flex; gap: 8px; align-items: stretch; }
.cred-row code {
  flex: 1; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.05rem;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--ink); word-break: break-all;
}
.copy {
  border: none; background: var(--meadow); color: #fff; font-weight: 700; font-family: "Baloo 2";
  border-radius: var(--radius-sm); padding: 0 18px; cursor: pointer; box-shadow: 0 4px 0 var(--meadow-dkr);
  transition: transform .1s ease;
}
.copy:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--meadow-dkr); }
.copy.done { background: var(--meadow-dk); }
.back-link { display: inline-block; margin-top: 20px; font-weight: 700; }

/* ---------- Admin ---------- */
.admin { padding: 30px 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-head h1 { margin: 0; }
.admin-sub { margin: 30px 0 14px; display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
.pill { background: var(--gold); color: var(--ink); font-family: "Baloo 2"; font-size: .95rem; padding: 2px 12px; border-radius: 999px; }
.admin-list { display: grid; gap: 14px; }
.app-row {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 18px 20px; display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap;
}
.app-name { font-family: "Baloo 2"; font-weight: 700; font-size: 1.2rem; }
.app-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--ink-soft); font-size: .92rem; font-weight: 600; margin-top: 4px; }
.app-msg { background: var(--cream); border-left: 3px solid var(--meadow); padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); margin: 10px 0 6px; }
.app-link { font-size: .85rem; font-weight: 700; }
.app-actions { display: flex; gap: 10px; }
.empty { color: var(--ink-soft); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.decided { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.decided th, .decided td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.decided th { background: var(--cream); color: var(--ink-soft); font-family: "Baloo 2"; }
.tag { font-weight: 700; font-size: .82rem; padding: 3px 10px; border-radius: 999px; }
.tag-approved { background: #e6f6e4; color: #2f7d33; }
.tag-denied { background: #fde8e6; color: #b23a2f; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; padding: 30px clamp(16px,5vw,32px) 40px; color: var(--ink-soft); }
.site-footer .disclaimer { max-width: 620px; margin: 8px auto 0; font-size: .78rem; opacity: .85; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .float-sphere { width: 180px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .apply-inner { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
