/* =========================================================
   Fern Hush - main stylesheet
   Playful Y2K flat design, sky blue / cyan gradients
   ========================================================= */

:root {
  --cyan: #16c7e8;
  --cyan-soft: #d7f6fd;
  --magenta: #ff3fa4;
  --purple: #8b5cf6;
  --yellow: #ffd426;
  --ink: #123244;
  --ink-soft: #5c7c8c;
  --white: #ffffff;
  --radius: 16px;
  --shadow-sm: 0 4px 14px rgba(18, 50, 68, 0.08);
  --shadow-md: 0 10px 26px rgba(18, 50, 68, 0.14);
  --shadow-lg: 0 18px 40px rgba(18, 50, 68, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eafaff 0%, #ffffff 40%, #e6f8ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--cyan-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: -0.5px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo span.hush {
  color: var(--magenta);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 2px solid var(--cyan-soft);
  background: #fff;
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.18s ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: var(--shadow-sm);
}

.search-box {
  display: none;
  align-items: center;
  gap: 8px;
}

.search-box.open {
  display: flex;
}

.search-box input {
  width: 200px;
  height: 42px;
  border-radius: 14px;
  border: 2px solid var(--cyan-soft);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.search-box input:focus {
  border-color: var(--cyan);
}

/* user dropdown */
.user-menu {
  position: relative;
}

.dropdown {
  position: absolute;
  right: 0;
  top: 54px;
  width: 210px;
  background: #fff;
  border: 2px solid var(--cyan-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: none;
}

.dropdown.open {
  display: block;
}

.dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
}

.dropdown a:hover {
  background: var(--cyan-soft);
}

.dropdown .sep {
  height: 2px;
  background: var(--cyan-soft);
  margin: 6px 4px;
  border-radius: 2px;
}

/* ---------------- Hero / grid ---------------- */

.hero {
  padding: 34px 0 10px;
}

.hero-title {
  margin: 0 0 6px;
  font-size: 34px;
  letter-spacing: -1px;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--magenta), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 15px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.pill {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: bold;
  background: #fff;
  border: 2px solid var(--cyan-soft);
  box-shadow: var(--shadow-sm);
}

.pill.magenta {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #fff;
}

.pill.yellow {
  background: var(--yellow);
  border-color: var(--yellow);
}

.pill.purple {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-flow: dense;
  gap: 14px;
  padding-bottom: 40px;
}

.game-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  aspect-ratio: 1 / 1;
  --card-y: 0px;
  --card-r: 0deg;
  transform: translateY(var(--card-y)) rotate(var(--card-r));
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(var(--card-y)) rotate(var(--card-r)) scale(1.04);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.game-card .thumb {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Toy-like initial badge used as the game artwork */
.game-card .glyph {
  width: 54%;
  aspect-ratio: 1 / 1;
  border-radius: 22%;
  background: rgba(255, 255, 255, 0.28);
  border: 3px solid rgba(255, 255, 255, 0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: bold;
  letter-spacing: -1px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.game-card.big {
  grid-column: span 2;
  grid-row: span 2;
}

.game-card.big .glyph {
  width: 40%;
  font-size: 70px;
}

.game-card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.game-card .meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96) 46%);
  padding: 26px 12px 12px;
}

.game-card.big .meta {
  padding: 30px 16px 16px;
}

.game-card .meta h3 {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card.big .meta h3 {
  font-size: 20px;
}

.game-card .meta p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

/* loose, playful offsets while staying 1:1 */
.game-card.nudge-up { --card-y: -8px; }
.game-card.nudge-down { --card-y: 8px; }
.game-card.tilt-left { --card-r: -1.5deg; }
.game-card.tilt-right { --card-r: 1.5deg; }
.game-card.round-soft { border-radius: 22px; }
.game-card.round-sharp { border-radius: 10px; }

/* gradient thumbnails */
.g1 { background: linear-gradient(135deg, #16c7e8, #8b5cf6); }
.g2 { background: linear-gradient(135deg, #ff3fa4, #ffd426); }
.g3 { background: linear-gradient(135deg, #8b5cf6, #ff3fa4); }
.g4 { background: linear-gradient(135deg, #ffd426, #16c7e8); }
.g5 { background: linear-gradient(135deg, #00d3a7, #16c7e8); }
.g6 { background: linear-gradient(135deg, #ff8a3d, #ff3fa4); }
.g7 { background: linear-gradient(135deg, #6ee7ff, #b794ff); }
.g8 { background: linear-gradient(135deg, #ff6b6b, #ffd426); }

/* ---------------- Page shell ---------------- */

.page {
  padding: 34px 0 60px;
}

.page-head {
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -0.8px;
}

.page-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.card {
  background: #fff;
  border: 2px solid var(--cyan-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.card h3 {
  margin: 18px 0 8px;
  font-size: 16px;
  color: var(--purple);
}

.card p,
.card li {
  font-size: 14px;
  line-height: 1.7;
  color: #2c4d5e;
}

.narrow {
  max-width: 520px;
  margin: 0 auto;
}

/* ---------------- Forms ---------------- */

.form-row {
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 2px solid var(--cyan-soft);
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fbfeff;
  outline: none;
}

textarea {
  height: auto;
  padding: 12px 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(22, 199, 232, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.18s ease;
  color: #fff;
  background: linear-gradient(135deg, var(--magenta), var(--purple));
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn.block {
  width: 100%;
}

.btn.cyan {
  background: linear-gradient(135deg, var(--cyan), #0b9fd0);
}

.btn.yellow {
  background: var(--yellow);
  color: var(--ink);
}

.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--cyan-soft);
}

.form-hint {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 14px;
  text-align: center;
}

.form-hint a {
  color: var(--magenta);
  font-weight: bold;
}

.link-right {
  text-align: right;
  font-size: 13px;
  margin-top: -6px;
}

.link-right a {
  color: var(--magenta);
  font-weight: bold;
}

/* ---------------- Recharge ---------------- */

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.amount-opt {
  border: 2px solid var(--cyan-soft);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.18s ease;
}

.amount-opt:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.amount-opt.active {
  border-color: var(--magenta);
  background: #fff5fa;
}

.amount-opt strong {
  display: block;
  font-size: 20px;
}

.amount-opt small {
  color: var(--ink-soft);
  font-size: 12px;
}

.preview-box {
  border-radius: var(--radius);
  padding: 18px 20px;
  background: linear-gradient(135deg, #e9fbff, #f7edff);
  border: 2px dashed var(--cyan);
  margin-bottom: 20px;
}

.preview-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 5px 0;
}

.preview-line.total {
  font-size: 19px;
  font-weight: bold;
  border-top: 2px solid rgba(22, 199, 232, 0.4);
  margin-top: 8px;
  padding-top: 12px;
  color: var(--purple);
}

.ladder {
  width: 100%;
  border-collapse: collapse;
}

.ladder th,
.ladder td {
  text-align: left;
  padding: 10px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--cyan-soft);
}

.ladder th {
  background: var(--cyan-soft);
  font-size: 13px;
}

.ladder tr:last-child td {
  border-bottom: none;
  font-weight: bold;
  color: var(--magenta);
}

/* ---------------- Table ---------------- */

.table-scroll {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

table.data th,
table.data td {
  text-align: left;
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--cyan-soft);
  white-space: nowrap;
}

table.data th {
  background: var(--cyan-soft);
  font-size: 13px;
}

table.data tbody tr:hover {
  background: #f6fdff;
}

.status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
}

.status.ok {
  background: #d7fbee;
  color: #067a58;
}

.status.fail {
  background: #ffe0ea;
  color: #b41a52;
}

/* ---------------- User center layout ---------------- */

.uc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

.uc-nav {
  background: #fff;
  border: 2px solid var(--cyan-soft);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow-sm);
}

.uc-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
}

.uc-nav a:hover {
  background: var(--cyan-soft);
}

.uc-nav a.active {
  background: linear-gradient(135deg, var(--magenta), var(--purple));
  color: #fff;
}

.balance-card {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.balance-card small {
  opacity: 0.85;
  font-size: 12px;
}

.balance-card strong {
  display: block;
  font-size: 28px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: #0e2f41;
  color: #cfeaf5;
  padding: 40px 0 24px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.site-footer h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #fff;
}

.site-footer p,
.site-footer a {
  font-size: 13px;
  line-height: 1.9;
  color: #a9cfe0;
}

.site-footer a:hover {
  color: var(--yellow);
}

.footer-links a {
  display: block;
}

.footer-bottom {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  color: #85b3c8;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 980px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .uc-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid,
  .amount-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .search-box input {
    width: 130px;
  }
}
