/* ============================================================
   Luna Online — Modern Bright Theme
   Classic Celestia Luna look, refreshed for 2026
   ============================================================ */

:root {
  --sky-1:   #6fb7f0;
  --sky-2:   #a8dcff;
  --sky-3:   #d8f0ff;
  --ink:     #34405e;
  --ink-dim: #7b88a8;
  --line:    #e4ecf7;

  --blue:    #2f95ff;
  --blue-d:  #1f6fd6;
  --pink:    #ff5fa0;
  --pink-d:  #e23d82;
  --green:   #41c95a;
  --green-d: #2ba745;
  --orange:  #ff9d2e;
  --orange-d:#f07c0c;
  --gold:    #ffc24b;

  --card:    #ffffff;
  --radius:  20px;
  --shadow:  0 14px 34px -16px rgba(35, 80, 150, 0.45);
  --shadow-sm: 0 6px 18px -8px rgba(35, 80, 150, 0.4);

  --grad-blue: linear-gradient(135deg, #3aa6ff, #2f7fe6);
  --grad-pink: linear-gradient(135deg, #ff7bb6, #ff4f93);
  --grad-head: linear-gradient(135deg, #4db5ff, #6f8bff);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;
  min-height: 100vh;
  background:
    radial-gradient(closest-side at 12% 22%, rgba(255,255,255,.85), transparent 70%),
    radial-gradient(closest-side at 82% 16%, rgba(255,255,255,.7), transparent 70%),
    radial-gradient(closest-side at 65% 40%, rgba(255,255,255,.55), transparent 70%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 30%, var(--sky-3) 60%, #eaf7ff 100%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, .logo { font-family: 'Fredoka', 'Nunito', sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.center { text-align: center; }
.mt { margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 22px; border-radius: 999px;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: .95rem;
  color: #fff; border: none; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn-blue   { background: linear-gradient(135deg, var(--blue),   var(--blue-d)); }
.btn-pink   { background: linear-gradient(135deg, var(--pink),   var(--pink-d)); }
.btn-green  { background: linear-gradient(135deg, var(--green),  var(--green-d)); }
.btn-orange { background: linear-gradient(135deg, var(--orange), var(--orange-d)); }
.btn-lg     { padding: 14px 32px; font-size: 1.08rem; }
.btn-sm     { padding: 8px 16px; font-size: .85rem; }
.btn-block  { display: flex; width: 100%; }

/* ---------- Top bar ---------- */
.topbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-top: 3px solid #6d3a3a;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: .8rem; font-weight: 600;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 12px; flex-wrap: wrap; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tb-item { display: inline-flex; align-items: center; }
.tb-item b { color: var(--ink); font-weight: 800; }
#server-clock { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--blue-d); }
.tb-sep { width: 1px; height: 16px; background: var(--line); }
.topbar a { color: var(--blue-d); font-weight: 700; text-decoration: none; }
.topbar a:hover { text-decoration: underline; text-underline-offset: 2px; }

.tb-status { display: inline-flex; align-items: center; gap: 10px; }
.srv { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-dim); font-weight: 700; }
.sdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.sdot.online { background: var(--green); box-shadow: 0 0 7px var(--green); }
.sdot.busy { background: #ff9d2e; box-shadow: 0 0 7px #ff9d2e; }
.sdot.offline { background: #ff5f6d; box-shadow: 0 0 7px #ff5f6d; }

/* ---------- Banner ---------- */
.banner {
  position: relative;
  text-align: center;
  padding: 34px 18px 30px;
  overflow: hidden;
}
/* ---------- Background decorations ---------- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url('../img/bg-clouds.png') repeat-x top center / 1200px auto;
  opacity: .35;
}
.banner-chars {
  position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden;
  max-width: 1400px; margin: 0 auto;
}

.logo { position: relative; display: inline-block; z-index: 2; }
.logo .sub {
  font-size: .95rem; font-weight: 600; letter-spacing: 5px;
  color: #2c63a8; text-transform: uppercase;
}
.logo .main {
  font-size: clamp(2.4rem, 6vw, 3.8rem); font-weight: 700; line-height: 1;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #fff 0%, #cfeaff 45%, #ffd56b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #2f6fb8;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(47,111,184,.25);
}
.download-wrap { margin-top: 16px; position: relative; z-index: 2; }

/* ---------- Main nav ---------- */
.mainnav {
  position: relative; z-index: 100;
  margin-top: 10px;
  padding: 10px 0;
}
.mainnav .container {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 16px;
  background: linear-gradient(180deg, #fdf7e6 0%, #f4e8c8 100%);
  border-top: 3px solid #caa14b;
  border-bottom: 3px solid #caa14b;
  border-radius: 16px;
  box-shadow: inset 0 2px 0 #fffdf3, inset 0 -2px 0 #e9d6a4, 0 4px 14px -6px rgba(120,90,30,.45);
}
/* Gem ornaments at the container edges */
.gem { position: absolute; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d9a8ff, #8e3bd6 60%, #5a1f9c);
  box-shadow: 0 0 0 4px #f4e8c8, 0 0 0 6px #caa14b, 0 2px 6px rgba(0,0,0,.3); z-index: 2; }
.gem::after { content: ''; position: absolute; top: 5px; left: 6px; width: 8px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.75); }
.gem-left { left: 16px; }
.gem-right { right: 16px; }

.nav-links { display: flex; gap: 0; flex-wrap: wrap; justify-content: center; }
.nav-links > li { position: relative; }
.nav-links > li + li { border-left: 1px solid rgba(180,150,90,.3); }
.nav-links > li > a {
  display: flex; align-items: center; gap: 5px; padding: 15px 20px;
  font-family: 'Fredoka', sans-serif; font-weight: 500; font-size: .98rem;
  color: #6a5333; transition: color .2s, background .2s; text-shadow: 0 1px 0 #fffdf3;
}
.nav-links > li > a:hover { color: #b5701a; background: rgba(255,255,255,.45); }
.nav-links > li > a.active { color: #fff; background: linear-gradient(180deg,#f0a93e,#e08a1a); text-shadow: 0 1px 1px rgba(120,70,0,.5); }
.nav-links .caret { font-style: normal; font-size: .7rem; opacity: .7; }

/* Dropdown submenu */
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 190px;
  background: #fff; border: 1px solid var(--line); border-top: 3px solid #caa14b;
  border-radius: 0 0 12px 12px; box-shadow: var(--shadow); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s; z-index: 50;
}
.has-sub:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu li a { display: block; padding: 9px 14px; border-radius: 8px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.submenu li a:hover { background: #fbf3df; color: #b5701a; }

.nav-toggle { display: none; position: absolute; right: 12px; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: #8a6a30; border-radius: 3px; transition: .3s; }

/* ---------- Layout ---------- */
.layout {
  display: grid; grid-template-columns: 268px 1fr; gap: 22px;
  padding: 28px 0 40px; align-items: start;
}

/* ---------- Sidebar widgets ---------- */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.widget {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid rgba(255,255,255,.8);
}
.widget-head {
  background: var(--grad-head); color: #fff;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1rem;
  padding: 12px 18px;
}
.widget-body { padding: 16px 18px 18px; }

.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form input {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #f7fafe;
  font-family: inherit; font-size: .9rem; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.login-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,149,255,.15); background: #fff; }
.login-links { display: flex; justify-content: space-between; font-size: .82rem; margin-top: 2px; }
.login-links a { color: var(--blue-d); font-weight: 700; }

.char-box { text-align: center; }
.char-avatar {
  width: 86px; height: 86px; margin: 0 auto 12px;
  border-radius: 50%; display: grid; place-items: center;
  font-size: 2.6rem;
  background: radial-gradient(circle at 50% 30%, #eaf4ff, #cfe6ff);
  border: 3px solid #fff; box-shadow: var(--shadow-sm);
}
.char-box b { display: block; font-size: 1.05rem; }
.char-box small { color: var(--ink-dim); }

.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 10px; transition: background .2s;
}
.rank-row:hover { background: #f3f8ff; }
.rank-row b { flex: 1; font-family: 'Fredoka', sans-serif; font-weight: 500; font-size: .92rem; }
.rank-row .lv { color: var(--orange-d); font-weight: 800; font-size: .9rem; }
.rank-badge {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px;
  display: grid; place-items: center; font-weight: 800; font-size: .82rem;
  background: #eaf0fa; color: var(--ink-dim);
}
.rank-badge.g1 { background: linear-gradient(135deg,#ffd86b,#ff9f1c); color: #5a3b00; }
.rank-badge.g2 { background: linear-gradient(135deg,#e3ecf7,#aebdd4); color: #3a455e; }
.rank-badge.g3 { background: linear-gradient(135deg,#f0a868,#c5703a); color: #4a2400; }

.server-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem;
}
.server-row:last-child { border-bottom: none; }
.server-row span { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.server-row small { color: var(--ink-dim); }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.maint  { background: var(--orange); box-shadow: 0 0 8px var(--orange); }

/* ---------- Content cards ---------- */
.content { display: flex; flex-direction: column; gap: 22px; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 26px;
  border: 1px solid rgba(255,255,255,.8);
}

.help-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(135deg, #fff4dc, #ffe9c2);
  border: 1px solid #ffe0a8; flex-wrap: wrap;
}
.help-banner h3 { color: var(--orange-d); font-size: 1.2rem; }
.help-banner p { color: #9a6a1c; font-size: .92rem; }

.post-title { font-size: 1.55rem; color: var(--ink); }
.post-date { color: var(--ink-dim); font-size: .82rem; font-weight: 700; margin: 4px 0 18px; }

.post-hero {
  position: relative; border-radius: 16px; overflow: hidden;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.post-hero img { width: 100%; height: 300px; object-fit: cover; }
.ribbon {
  position: absolute; left: 0; bottom: 16px;
  background: var(--grad-pink); color: #fff;
  font-family: 'Fredoka', sans-serif; font-weight: 600; letter-spacing: 1px;
  padding: 8px 22px 8px 18px; border-radius: 0 999px 999px 0;
  box-shadow: var(--shadow-sm);
}

.post-body h4 { font-size: 1.3rem; color: var(--blue-d); margin-bottom: 10px; }
.post-body p { color: var(--ink); margin-bottom: 16px; }

.feature-list { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; }
.feature-list .fi {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-size: 1.2rem;
  background: #eaf4ff;
}
.feature-list div { font-size: .94rem; color: var(--ink); }
.feature-list b { color: var(--ink); }

.section-title { font-size: 1.35rem; color: var(--ink); margin-bottom: 16px; }

.pvp-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: center; }
.pvp-grid img { border-radius: 14px; height: 100%; object-fit: cover; box-shadow: var(--shadow-sm); }

.promo {
  text-align: center;
  background: linear-gradient(135deg, #7b6bff, #b06bff 50%, #ff6bbd);
  border: none; color: #fff;
}
.promo h2 { font-size: clamp(1.4rem, 3vw, 2rem); color: #fff; text-shadow: 0 3px 8px rgba(0,0,0,.2); }

/* ---------- Item grid ---------- */
.items-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.item {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: #fff; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.item:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: #cfe2ff; }
.item-thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: #f3f8ff; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-tag {
  position: absolute; top: 8px; left: 8px;
  background: var(--grad-blue); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .5px;
  padding: 3px 10px; border-radius: 999px; text-transform: uppercase;
}
.item-tag.sale { background: linear-gradient(135deg,#ff5f6d,#ff2d55); }
.item-tag.ret  { background: linear-gradient(135deg,#41c95a,#2ba745); }
.item-info { padding: 12px 14px 14px; }
.item-info h5 { font-size: .95rem; margin-bottom: 10px; }
.item-buy { display: flex; align-items: center; justify-content: space-between; }
.coin { font-weight: 800; color: var(--orange-d); font-size: .92rem; }

/* ---------- Events ---------- */
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.event {
  position: relative; border-radius: 16px; overflow: hidden;
  aspect-ratio: 4/3; box-shadow: var(--shadow-sm); display: block;
  transition: transform .2s;
}
.event:hover { transform: translateY(-4px); }
.event img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.event:hover img { transform: scale(1.08); }
.event .ev-body {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,30,55,.85) 8%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
}
.event h4 { color: #fff; font-size: 1.05rem; }
.event small { color: var(--gold); font-weight: 700; }

/* ---------- Sub pages ---------- */
.page-head { padding: 30px 0 22px; }
.page-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #fff; text-shadow: 0 3px 10px rgba(35,80,150,.4);
}
.crumb { font-size: .85rem; margin-bottom: 8px; color: #2c5184; font-weight: 700; }
.crumb a { color: var(--blue-d); }

.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th, .rank-table td { text-align: left; padding: 13px 16px; font-size: .92rem; }
.rank-table th { color: var(--ink-dim); font-size: .76rem; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid var(--line); }
.rank-table tbody tr { border-bottom: 1px solid var(--line); transition: background .2s; }
.rank-table tbody tr:hover { background: #f3f8ff; }

.steps-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.step { text-align: center; padding: 22px 16px; border: 1px solid var(--line); border-radius: 16px; background: #f9fcff; }
.step .n { width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; font-family: 'Fredoka'; font-weight: 700; color: #fff; background: var(--grad-blue); }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.specs-grid table { width: 100%; }
.specs-grid td { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.specs-grid td:first-child { color: var(--ink-dim); width: 38%; font-weight: 700; }

/* ---------- Footer ---------- */
.footer-scene {
  position: relative; height: 120px; margin-top: 30px;
  overflow: hidden;
}
.footer-scene .hill {
  position: absolute; bottom: 0; left: -5%; right: -5%; height: 90px;
  background: linear-gradient(180deg, #7ed957, #5cb83f);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.footer-scene span { position: absolute; bottom: 10px; font-size: 2.4rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.footer-scene .windmill { left: 8%; font-size: 2.8rem; }

.site-footer {
  background: linear-gradient(180deg, #2a3f6b, #1c2b4d);
  color: #cdd9f0; padding: 30px 0 26px; text-align: center;
}
.socials { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; }
.socials a {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,.1); font-size: 1.2rem; transition: .2s;
}
.socials a:hover { background: var(--grad-blue); transform: translateY(-3px); }
.foot-links { display: flex; gap: 8px 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.foot-links a { color: #cdd9f0; font-weight: 700; font-size: .9rem; }
.foot-links a:hover { color: #fff; }
.site-footer small { color: #8d9bc0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.reveal.show { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; order: 2; }
  .content { order: 1; }
  .items-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .nav-links {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: rgba(255,255,255,.98); backdrop-filter: blur(12px);
    padding: 12px; gap: 4px; border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transform: translateY(-160%); transition: transform .35s ease;
    max-height: calc(100vh - 90px); overflow-y: auto; z-index: 50;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 16px; }
  .nav-toggle { display: flex; }
  .mainnav .container { justify-content: flex-start; }
  .banner-chars .char { font-size: 2.2rem; }
  .banner-chars .c2, .banner-chars .c3 { display: none; }
}

@media (max-width: 700px) {
  .tb-hide-sm { display: none !important; }
  .topbar .container { justify-content: center; }
  .items-grid { grid-template-columns: repeat(2, 1fr); }
  .event-grid { grid-template-columns: 1fr; }
  .pvp-grid { grid-template-columns: 1fr; }
  .pvp-grid img { height: 200px; }
  .steps-grid { grid-template-columns: repeat(2,1fr); }
  .specs-grid, .guide-cols { grid-template-columns: 1fr !important; }
  .post-hero img { height: 200px; }
  .help-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 440px) {
  .items-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
}

/* ============================================================
   Reference-style panels (Member Panel / Featured Items)
   ============================================================ */
.panel-card {
  background: #fff; border: 1px solid #e6ddc8; border-radius: 12px;
  box-shadow: 0 6px 18px -10px rgba(120,90,30,.35); overflow: hidden;
}
.panel-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 12px; font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem; font-weight: 600; color: #5a6b8c;
  border-bottom: 1px solid #f0ecdf;
}
.panel-card-head .pc-ic {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #eaf2ff, #cfe0ff); font-size: 1rem;
}
.panel-card-body { padding: 16px 18px 18px; }

/* Login fields with icons */
.login-field { position: relative; margin-bottom: 12px; }
.login-field .lf-ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: .9rem; opacity: .6;
}
.login-field input {
  width: 100%; padding: 11px 14px 11px 38px; border-radius: 8px;
  border: 1px solid #dfe3ec; background: #f7f8fb; font-family: inherit;
  font-size: .92rem; color: var(--ink);
}
.login-field input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(47,149,255,.14); }

.login-buttons { display: flex; gap: 10px; margin-top: 2px; }
.btn-login, .btn-register {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 12px; border-radius: 8px; font-family: 'Fredoka', sans-serif;
  font-weight: 600; font-size: .9rem; letter-spacing: .5px; color: #fff;
  border: none; cursor: pointer; box-shadow: var(--shadow-sm); transition: .15s;
}
.btn-login { background: linear-gradient(180deg, #6b8cff, #4a63e0); }
.btn-register { background: linear-gradient(180deg, #5fd06a, #36b04a); }
.btn-login:hover, .btn-register:hover { filter: brightness(1.06); transform: translateY(-1px); }
.login-trouble { display: block; text-align: center; margin-top: 12px; font-size: .82rem; color: var(--blue-d); font-weight: 600; }
.login-trouble:hover { text-decoration: underline; }

/* Featured Items carousel */
.featured-carousel { display: flex; align-items: center; gap: 6px; }
.fc-arrow {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #e0d9c5;
  background: #faf7ef; color: #9a8a64; font-size: 1.2rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: .15s;
}
.fc-arrow:hover { background: #f0a93e; color: #fff; border-color: #e08a1a; }
.fc-track { flex: 1; overflow: hidden; }
.fc-slide { text-align: center; display: none; }
.fc-slide.active { display: block; animation: fcfade .35s ease; }
@keyframes fcfade { from { opacity: 0; } to { opacity: 1; } }
.fc-img { width: 110px; height: 110px; margin: 4px auto 10px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #f3f6fb, #e4ebf6); display: grid; place-items: center; }
.fc-img img { width: 100%; height: 100%; object-fit: cover; }
.fc-name { font-family: 'Fredoka', sans-serif; font-weight: 500; color: #5a6b8c; margin-bottom: 8px; }
.fc-price {
  display: inline-flex; align-items: center; gap: 6px; min-width: 90px; justify-content: center;
  padding: 5px 16px; border-radius: 6px; font-family: 'Fredoka', sans-serif; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, #5aa9ff, #2f7fe0); box-shadow: 0 3px 8px -3px rgba(47,127,224,.7);
}
.fc-coin { width: 16px; height: 16px; border-radius: 50%; background: #ffd36b; color: #8a5a00; font-size: .68rem; display: grid; place-items: center; font-weight: 800; }
.fc-dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.fc-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d8d2c0; cursor: pointer; transition: .2s; display: inline-block; }
.fc-dots i.active { background: #2f7fe0; transform: scale(1.2); }

/* ============================================================
   Weekly Sale hero slider
   ============================================================ */
.hero-slider {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid #d7e6f5; box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 5; min-height: 150px;
}
.hs-track { position: relative; width: 100%; height: 100%; }
.hs-slide {
  position: absolute; inset: 0; display: flex; align-items: center; padding: 0 36px;
  opacity: 0; transition: opacity .6s ease; pointer-events: none;
}
.hs-slide.active { opacity: 1; pointer-events: auto; }
.hs-1 { background: linear-gradient(135deg, #bfe3ff 0%, #e7f4ff 55%, #d6c9ff 100%); }
.hs-2 { background: linear-gradient(135deg, #ffe1c2 0%, #fff3e0 55%, #ffd0e6 100%); }
.hs-3 { background: linear-gradient(135deg, #d8c9ff 0%, #efe7ff 55%, #ffd6f0 100%); }
.hs-4 { background: linear-gradient(135deg, #c2f0d8 0%, #e6fff1 55%, #c6e6ff 100%); }
.hs-title {
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1; color: #2f95ff; -webkit-text-stroke: 1.5px #fff; paint-order: stroke fill;
  text-shadow: 0 3px 0 rgba(47,149,255,.25); margin-bottom: 8px;
}
.hs-sub {
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: clamp(1rem, 2.2vw, 1.5rem);
  color: #f08a1a; -webkit-text-stroke: 1px #fff; paint-order: stroke fill; max-width: 60%;
  text-shadow: 0 2px 0 rgba(240,138,26,.2);
}
.hs-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 3; }
.hs-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.7); border: 1px solid rgba(0,0,0,.1); cursor: pointer; transition: .2s; }
.hs-dots i.active { background: #2f7fe0; }

/* News post header (avatar + dotted title) */
.post-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; margin-bottom: 18px; }
.post-avatar {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.6rem; background: radial-gradient(circle at 50% 35%, #ffe6f0, #ffc9e0); border: 2px solid #fff; box-shadow: var(--shadow-sm);
}
.post-title-2 {
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.5rem; color: #e0894a;
  border-bottom: 2px dashed #e6ddc8; padding-bottom: 6px; display: inline-block;
}
.post-date-2 { color: var(--ink-dim); font-size: .82rem; margin-top: 6px; }

@media (max-width: 700px) {
  .hs-sub { max-width: 100%; }
  .hs-slide { padding: 0 22px; }
}

@media (max-width: 820px) {
  .gem { display: none; }
  .nav-links > li + li { border-left: none; }
  .nav-links > li > a { padding: 13px 16px; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-radius: 0; padding: 0 0 6px 18px;
    background: transparent; min-width: 0;
  }
  .submenu li a { padding: 8px 10px; font-size: .88rem; color: var(--ink-dim); }
  .has-sub > a .caret { margin-left: auto; }
}

/* ============================================================
   News & Media page
   ============================================================ */
.news-page { padding-bottom: 40px; }
.news-lead {
  color: rgba(255,255,255,.92); font-size: 1rem; max-width: 620px;
  margin-top: 8px; line-height: 1.55; text-shadow: 0 2px 6px rgba(35,80,150,.25);
}

.news-stats {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px;
}
.news-stat {
  flex: 1; min-width: 120px;
  background: rgba(255,255,255,.92); border-radius: 14px;
  padding: 16px 20px; text-align: center;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,.9);
}
.news-stat-num {
  display: block; font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem; font-weight: 700; color: var(--blue-d);
}
.news-stat-lbl {
  display: block; font-size: .78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; color: var(--ink-dim); margin-top: 2px;
}

.news-toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-bottom: 14px;
}
.news-search-wrap {
  flex: 1; min-width: 220px; position: relative;
}
.news-search-ic {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: .95rem; pointer-events: none; opacity: .55;
}
.news-search {
  width: 100%; padding: 12px 40px 12px 42px;
  border: 2px solid rgba(255,255,255,.85); border-radius: 999px;
  background: rgba(255,255,255,.95); font-family: inherit; font-size: .92rem;
  color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s;
}
.news-search:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,149,255,.2);
}
.news-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: none; border-radius: 50%;
  background: #eef4ff; color: var(--ink-dim); cursor: pointer; font-size: .75rem;
}
.news-search-clear:hover { background: #dce8ff; color: var(--ink); }
.news-sort {
  padding: 12px 36px 12px 16px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.85); background: rgba(255,255,255,.95);
  font-family: inherit; font-size: .9rem; font-weight: 700; color: var(--ink);
  cursor: pointer; outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237b88a8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

.news-filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.news-filter {
  padding: 8px 16px; border-radius: 999px; border: 2px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.75); font-family: 'Fredoka', sans-serif;
  font-size: .88rem; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: background .2s, transform .2s, border-color .2s, color .2s;
}
.news-filter:hover { background: #fff; transform: translateY(-1px); }
.news-filter.active {
  background: var(--grad-blue); color: #fff; border-color: transparent;
  box-shadow: var(--shadow-sm);
}
.filter-count {
  display: inline-block; margin-left: 4px; opacity: .75; font-size: .78rem;
}

.news-layout {
  display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start;
}

.news-featured {
  margin-bottom: 24px; border-radius: var(--radius); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.85);
  transition: transform .25s, box-shadow .25s;
}
.news-featured:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -14px rgba(35,80,150,.5); }
.news-featured-link {
  display: grid; grid-template-columns: 1.1fr 1fr; text-decoration: none; color: inherit;
}
.news-featured-media { position: relative; overflow: hidden; min-height: 240px; }
.news-featured-media img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .45s;
}
.news-featured:hover .news-featured-media img { transform: scale(1.05); }
.news-featured-badge {
  position: absolute; top: 16px; left: 16px;
  background: linear-gradient(135deg, #ffc24b, #ff9d2e); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .5px;
  padding: 6px 14px; border-radius: 999px; text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}
.news-featured-body { padding: 28px 26px; display: flex; flex-direction: column; justify-content: center; }
.news-featured-body h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem); color: var(--ink); margin: 10px 0 12px;
}
.news-featured-body p { color: var(--ink-dim); font-size: .94rem; line-height: 1.55; margin-bottom: 14px; }

.news-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  font-size: .8rem; font-weight: 700; color: var(--ink-dim); margin-bottom: 12px;
}
.news-meta-lg { font-size: .88rem; margin-bottom: 0; }

.news-results-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; font-size: .88rem; font-weight: 700; color: rgba(255,255,255,.9);
}
.news-empty-msg { color: #ffd56b; }

.news-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px;
}
.news-grid-compact { margin-bottom: 30px; }

.news-card {
  background: var(--card); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,.85);
  transition: transform .25s, box-shadow .25s, opacity .3s;
  display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.news-card[hidden] { display: none !important; }
.news-card.is-hidden { opacity: 0; transform: scale(.96); pointer-events: none; height: 0; overflow: hidden; margin: 0; padding: 0; border: none; }

.news-card-link { text-decoration: none; color: inherit; flex: 1; display: flex; flex-direction: column; }
.news-card-media { position: relative; overflow: hidden; aspect-ratio: 16/10; background: #eef4ff; }
.news-card-media img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .4s;
}
.news-card:hover .news-card-media img { transform: scale(1.07); }
.news-card-media .item-tag { top: 10px; left: 10px; }

.news-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.news-card-body h3 {
  font-size: 1.08rem; color: var(--ink); margin-bottom: 6px;
  transition: color .2s;
}
.news-card:hover .news-card-body h3 { color: var(--blue-d); }
.news-card-body p {
  font-size: .88rem; color: var(--ink-dim); line-height: 1.5; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-more {
  display: inline-block; margin-top: 12px; font-size: .85rem; font-weight: 800;
  color: var(--blue); transition: transform .2s;
}
.news-card:hover .news-card-more { transform: translateX(4px); }

.news-card-share {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-top: 1px solid var(--line);
  font-size: .78rem; font-weight: 700; color: var(--ink-dim);
}
.share-btn {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px;
  padding: 0 8px; border-radius: 8px; border: 1px solid var(--line);
  background: #f7faff; color: var(--ink); font-size: .82rem;
  cursor: pointer; text-decoration: none; transition: background .2s, transform .2s;
}
.share-btn:hover { background: #eaf2ff; transform: translateY(-2px); }
.share-btn.is-copied { background: #e8f8ec; border-color: #b8e6c4; color: var(--green-d); }

/* Category tag colors */
.item-tag.cat-update { background: var(--grad-blue); }
.item-tag.cat-event  { background: linear-gradient(135deg, #ff9d2e, #f07c0c); }
.item-tag.cat-pvp    { background: linear-gradient(135deg, #ff5f6d, #e23d82); }
.item-tag.cat-patch  { background: linear-gradient(135deg, #41c95a, #2ba745); }
.item-tag.cat-community { background: linear-gradient(135deg, #7b6bff, #5a4fd6); }

.news-load-wrap { text-align: center; margin-top: 28px; }

/* Sidebar widgets */
.news-sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 20px; }
.news-widget {
  background: var(--card); border-radius: 16px; padding: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,.85);
}
.news-widget h4 {
  font-family: 'Fredoka', sans-serif; font-size: 1.05rem;
  color: var(--ink); margin-bottom: 14px;
}
.news-widget p { font-size: .88rem; color: var(--ink-dim); line-height: 1.5; margin-bottom: 14px; }
.news-widget-actions { display: flex; flex-direction: column; gap: 8px; }
.news-widget-promo {
  background: linear-gradient(135deg, #f3f8ff, #e8f0ff);
  border-color: #cfe2ff;
}

.news-cat-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.news-cat-btn {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 10px 12px; border: none; border-radius: 10px; background: transparent;
  font-family: inherit; font-size: .9rem; font-weight: 700; color: var(--ink);
  cursor: pointer; transition: background .2s;
}
.news-cat-btn:hover { background: #f3f8ff; }
.news-cat-count {
  background: #eef4ff; color: var(--blue-d); font-size: .75rem;
  padding: 2px 9px; border-radius: 999px;
}

.news-quick-links { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.news-quick-links a {
  display: block; padding: 9px 12px; border-radius: 10px;
  font-weight: 700; font-size: .9rem; color: var(--ink); transition: background .2s;
}
.news-quick-links a:hover { background: #f3f8ff; color: var(--blue-d); }

/* Article detail */
.news-article { margin-bottom: 30px; }
.news-article-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px;
}
.news-article-lead {
  font-size: 1.12rem; font-weight: 700; color: var(--blue-d);
  margin-bottom: 20px; line-height: 1.6;
}
.news-article-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line);
}
.news-share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--ink-dim); }
.news-related { margin-bottom: 30px; }

@media (max-width: 980px) {
  .news-layout { grid-template-columns: 1fr; }
  .news-sidebar { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
}

@media (max-width: 760px) {
  .news-featured-link { grid-template-columns: 1fr; }
  .news-featured-media { min-height: 200px; max-height: 220px; }
  .news-featured-body { padding: 20px; }
  .news-toolbar { flex-direction: column; align-items: stretch; }
  .news-sort { width: 100%; }
  .news-stats { gap: 10px; }
  .news-stat { min-width: calc(33% - 8px); padding: 12px 10px; }
  .news-stat-num { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-stat { min-width: 100%; }
  .news-filters { gap: 6px; }
  .news-filter { padding: 7px 12px; font-size: .82rem; }
  .news-sidebar { grid-template-columns: 1fr; }
}

/* ============================================================
   Terms of Service page (classic Celestia Luna document style)
   ============================================================ */
.tos-layout { padding-top: 8px; }

.tos-document {
  background: linear-gradient(180deg, #fdfbf5 0%, #f8f4ea 100%);
  border: 1px solid #e6ddc8;
  border-radius: 12px;
  padding: 38px 44px 34px;
  box-shadow: 0 8px 24px -12px rgba(120, 90, 30, .28);
  color: #3d3d3d;
}

.tos-title {
  text-align: center;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: clamp(1.7rem, 3.5vw, 2.15rem);
  font-weight: 700;
  color: #5a4030;
  letter-spacing: .3px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8dcc8;
}

.tos-intro {
  font-size: .92rem;
  line-height: 1.7;
  color: #4a4a4a;
  margin-bottom: 10px;
  text-align: justify;
}

.tos-updated {
  font-size: .78rem;
  font-weight: 700;
  color: #9a8a72;
  text-align: center;
  margin-bottom: 22px;
}

.tos-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 14px 16px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, .65);
  border: 1px solid #ebe3d2;
  border-radius: 10px;
}
.tos-nav a {
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e0d5c0;
  font-size: .78rem;
  font-weight: 700;
  color: #6b5538;
  transition: background .2s, color .2s, border-color .2s;
}
.tos-nav a:hover {
  background: #f0a93e;
  border-color: #e08a1a;
  color: #fff;
}

.tos-section { margin-bottom: 26px; scroll-margin-top: 20px; }
.tos-section h2 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: #6b4e3d;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e0d5c0;
}
.tos-section p {
  font-size: .88rem;
  line-height: 1.68;
  color: #444;
  margin-bottom: 10px;
  text-align: justify;
}
.tos-section ol {
  padding-left: 22px;
  margin: 0;
}
.tos-section li {
  font-size: .88rem;
  line-height: 1.65;
  color: #444;
  margin-bottom: 10px;
  text-align: justify;
}
.tos-section li b { color: #5a4030; }
.tos-section a { color: var(--blue-d); font-weight: 700; }
.tos-section a:hover { text-decoration: underline; }

.tos-footer-note {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid #e8dcc8;
  font-size: .82rem;
  font-style: italic;
  color: #7a6a58;
  text-align: center;
  line-height: 1.55;
}

/* Player ranking panel (sidebar) */
.panel-rank-body { padding: 0 !important; }
.prank-table { width: 100%; border-collapse: collapse; }
.prank-table th,
.prank-table td {
  padding: 9px 14px;
  font-size: .82rem;
  text-align: left;
  border-bottom: 1px solid #f0ecdf;
}
.prank-table th {
  background: #faf7ef;
  color: #8a7a5a;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.prank-table tbody tr:hover { background: #fdfbf5; }
.prank-table td:last-child { text-align: right; color: var(--orange-d); }
.prank-job { font-size: 1rem; }
.prank-more {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--blue-d);
  border-top: 1px solid #f0ecdf;
}
.prank-more:hover { background: #faf7ef; text-decoration: underline; }

@media (max-width: 760px) {
  .tos-document { padding: 24px 20px; }
  .tos-nav { gap: 6px; }
  .tos-nav a { font-size: .72rem; padding: 5px 10px; }
}

@media (max-width: 480px) {
  .tos-section ol { padding-left: 18px; }
}
