/* FruitXP - modern site (index2.php). Same texts and data as the 2005 site, new look. */
@font-face { font-family: 'Blue Highway'; src: url('../bluehigh.ttf') format('truetype'); font-display: swap; }

:root {
  --bg: #0f0b2e;
  --bg2: #17124a;
  --panel: #ffffff;
  --ink: #1d1a3a;
  --muted: #6b6890;
  --line: #e7e5f5;
  --brand: #4a3cbf;          /* BGPanel colour of the game */
  --brand2: #6b5cff;
  --accent: #ffe924;         /* the yellow of the game's texts */
  --accent-ink: #2a2300;
  --good: #16a34a;
  --bad: #dc2626;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 12, 80, .12);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #f5f4fd;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- navigation */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 11, 46, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-family: 'Blue Highway', sans-serif; font-size: 26px; letter-spacing: .5px; }
.logo:hover { text-decoration: none; }
.logo .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #ffb020); box-shadow: 0 4px 14px rgba(255, 210, 0, .35); }
.logo .dot img { width: 22px; height: 22px; image-rendering: pixelated; }
.logo span b { color: var(--accent); font-weight: normal; }
.menu { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.menu a { color: #d6d3ff; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.menu a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.menu a.on { color: #fff; background: rgba(255, 255, 255, .12); }
.menu a.play { background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-left: 6px; }
.menu a.play:hover { background: #fff36a; }
.burger { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }

@media (max-width: 900px) {
  .burger { display: block; }
  .menu { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); padding: 10px 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .menu.open { display: flex; }
  .menu a { padding: 12px; font-size: 16px; }
  .menu a.play { margin: 6px 0 0; text-align: center; }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(107, 92, 255, .55), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(255, 233, 36, .18), transparent 60%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg2) 55%, var(--brand) 140%);
}
.hero::after { content: ''; position: absolute; inset: 0; background: url('../bg.gif') center/520px repeat; opacity: .05; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  color: var(--accent); background: rgba(255, 233, 36, .1); border: 1px solid rgba(255, 233, 36, .25); padding: 6px 12px; border-radius: 999px; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .2); }
.hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.05; margin: 18px 0 16px; letter-spacing: -1.5px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #ffb020); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: #cfcbf5; max-width: 560px; margin: 0 0 28px; }
.hero p.free { margin: -12px 0 24px; font-size: 14px; color: #a7f3c4; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 12px; font-weight: 700; font-size: 16px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s; cursor: pointer; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px rgba(255, 220, 0, .3); }
.btn.ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .2); }
.btn.dark { background: var(--brand); color: #fff; }
.btn.small { padding: 9px 14px; font-size: 14px; border-radius: 10px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.stat { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 12px 16px; min-width: 130px; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: #b9b4ec; text-transform: uppercase; letter-spacing: .5px; }
.shot { position: relative; justify-self: center; }
.shot .frame { border-radius: 20px; padding: 10px; background: linear-gradient(145deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .05));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5); transform: rotate(-2deg); }
.shot .frame img { display: block; border-radius: 12px; width: 100%; max-width: 440px; }
.shot .badge { position: absolute; bottom: -14px; left: -14px; background: #fff; color: var(--ink); border-radius: 14px; padding: 10px 14px;
  box-shadow: var(--shadow); font-size: 13px; display: flex; gap: 10px; align-items: center; }
.shot .badge b { font-size: 20px; color: var(--brand); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; gap: 36px; }
  .shot .frame { transform: none; }
}

/* ---------------------------------------------------------------- sections */
.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.page-head { background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 70%, var(--brand) 160%); color: #fff; padding: 56px 0 44px; }
.page-head h1 { margin: 0; font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -1px; }
.page-head p { margin: 8px 0 0; color: #cfcbf5; max-width: 680px; }
h2.title { font-size: clamp(26px, 3.5vw, 36px); letter-spacing: -.8px; margin: 0 0 8px; }
p.sub { color: var(--muted); margin: 0 0 32px; max-width: 680px; }

.grid { display: grid; gap: 20px; }
.grid.f4 { grid-template-columns: repeat(4, 1fr); }
.grid.f3 { grid-template-columns: repeat(3, 1fr); }
.grid.f2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.f4, .grid.f3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.f4, .grid.f3, .grid.f2 { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 2px rgba(20, 12, 80, .04); }
.card.lift { transition: transform .15s, box-shadow .15s; }
.card.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #f1efff; margin-bottom: 14px; }
.icon img { image-rendering: pixelated; }
.note { border-radius: 14px; padding: 14px 18px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; font-size: 15px; }
.note.warn { background: #fffbeb; border-color: #fde68a; color: #713f12; }

/* ---------------------------------------------------------------- tables (rankings) */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
table.rank { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.rank th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfaff; white-space: nowrap; }
table.rank th a { color: var(--muted); }
table.rank th.on { color: var(--brand); }
table.rank td { padding: 11px 14px; border-bottom: 1px solid #f1f0f9; white-space: nowrap; }
table.rank tr:last-child td { border-bottom: 0; }
table.rank tr:hover td { background: #faf9ff; }
table.rank tr.hl td { background: #ecfdf3; }
table.rank td.num, table.rank th.num { text-align: right; }
.pos { display: inline-grid; place-items: center; min-width: 30px; height: 26px; border-radius: 8px; background: #f1efff; font-weight: 700; font-size: 13px; color: var(--brand); }
.pos.p1 { background: #fff4b8; color: #8a6d00; }
.pos.p2 { background: #eef0f4; color: #4b5563; }
.pos.p3 { background: #fde8d7; color: #9a4b12; }
.player { font-weight: 600; color: var(--ink); }
.crown { width: 17px; vertical-align: -1px; margin-left: 4px; }
.status { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #dc2626; }   /* offline = red, like the game */
.status.online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.status.idle { background: #f59e0b; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #ecfdf3; color: var(--good); }
.pager { display: flex; justify-content: space-between; margin-top: 16px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-bottom: 14px; align-items: center; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.tabs { display: inline-flex; background: #ebe9fb; border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 20px; }
.tabs a { padding: 8px 16px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.tabs a:hover { text-decoration: none; }

/* ---------------------------------------------------------------- profile */
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 800px) { .kv { grid-template-columns: repeat(2, 1fr); } }
.kv .card b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.kv .card span { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.statgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 800px) { .statgrid { grid-template-columns: 1fr; } }
.statcard h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 16px; }
.statcard h4 img { image-rendering: pixelated; }
.statrow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px dashed #eceaf7; font-size: 14px; }
.statrow:first-of-type { border-top: 0; }
.statrow .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.statrow .d { font-size: 12px; font-weight: 600; margin-left: 6px; }
.d.up { color: var(--good); } .d.down { color: var(--bad); } .d.flat { color: #a3a1b8; }
.statrow .pc { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }

/* ---------------------------------------------------------------- forms */
.search { display: flex; gap: 10px; max-width: 520px; }
.search input { flex: 1; font: inherit; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; outline: none; }
.search input:focus { border-color: var(--brand2); box-shadow: 0 0 0 4px rgba(107, 92, 255, .15); }

/* ---------------------------------------------------------------- gallery */
.gallery { columns: 3 280px; column-gap: 20px; }
.gallery figure { break-inside: avoid; margin: 0 0 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.gallery img { display: block; width: 100%; }
.gallery figcaption { padding: 12px 16px; font-size: 14px; color: var(--muted); }
.lightbox { position: fixed; inset: 0; background: rgba(10, 8, 30, .88); display: none; place-items: center; z-index: 100; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 90vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); image-rendering: auto; }

/* ---------------------------------------------------------------- manual / prose */
.manual { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.manual nav { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; font-size: 14px; }
.manual nav h5 { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.manual nav a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--ink); }
.manual nav a:hover { background: #ebe9fb; text-decoration: none; }
.manual article { scroll-margin-top: 84px; }
.manual article + article { margin-top: 18px; }
.manual article h3 { margin: 0 0 10px; font-size: 20px; display: flex; gap: 12px; align-items: baseline; }
.manual article h3 small { color: var(--brand); font-weight: 700; font-size: 14px; }
.prose { font-size: 15.5px; color: #34314f; }
.prose table { border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.prose td { padding: 6px 10px; vertical-align: top; }
.prose li { margin: 4px 0; }
.prose img { border-radius: 8px; }
@media (max-width: 900px) { .manual { grid-template-columns: 1fr; } .manual nav { position: static; max-height: none; } }

/* ---------------------------------------------------------------- download steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 64px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 22px; top: 22px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.step .btn { margin-top: 14px; }

/* ---------------------------------------------------------------- contest history (original markup inside) */
.history { overflow-x: auto; }
.history table { border-collapse: collapse; }
.history td { padding: 4px 8px; }

/* ---------------------------------------------------------------- footer */
footer { background: var(--bg); color: #a9a5d6; padding: 40px 0; font-size: 14px; margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
footer a { color: #d6d3ff; }

/* ---------------------------------------------------------------- fixes: narrow screens, crisp 2x pixel icons */
html, body { overflow-x: hidden; }
.hero .wrap > *, .grid > *, .manual > * { min-width: 0; }
.shot { width: 100%; }
.shot .frame { max-width: 460px; margin: 0 auto; }
.stats .stat { flex: 1 1 120px; }
.icon img { width: 30px; height: 30px; object-fit: contain; }
.statcard h4 img { width: 24px; height: 24px; object-fit: contain; }
.logo .dot img { width: 24px; height: 24px; object-fit: contain; }
@media (max-width: 600px) {
  .hero h1 { letter-spacing: -1px; }
  .cta .btn { flex: 1 1 100%; justify-content: center; }
  .shot .badge { left: 8px; }
}
