/* World of Pokémon — home page, RPG / title-screen theme */

@import url("ow-bg.css");

:root {
  --ink: #283593;          /* navy outline / text accents */
  --ink-dark: #1a2570;
  --paper: #f8f8f0;        /* dialogue-box interior */
  --paper-edge: #6a6ad8;   /* inner border highlight */
  --text: #2a2a33;
  --muted: #5a5a72;
  --sky-1: #67c1ff;
  --sky-2: #b6e7ff;
  --grass-1: #57c25a;
  --grass-2: #44a64a;
  --accent: #e3350d;       /* Poké red */
  --accent-dark: #b71c0a;
  --gold: #ffcb05;         /* logo yellow */
  --gold-edge: #2a75bb;    /* logo blue edge */
  --shadow: rgba(20, 25, 60, .35);
  --px: "Press Start 2P", "Courier New", monospace;
  --body: "VT323", "Courier New", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 22px;
  line-height: 1.35;
  color: var(--text);
  background: var(--sky-2);
  image-rendering: pixelated;
  overflow-x: hidden;
}

img { image-rendering: pixelated; }

a { color: var(--ink); text-decoration: none; }

/* ---------- Dialogue box (the core UI element) ---------- */
.textbox {
  position: relative;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 4px var(--paper),
    inset 0 0 0 8px var(--paper-edge),
    0 6px 0 var(--shadow);
  padding: 22px 24px;
}

/* ---------- Buttons / menu ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--px); font-size: 10px; line-height: 1;
  letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--accent);
  border: 3px solid var(--ink-dark);
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink-dark);
  transition: transform .05s ease, box-shadow .05s ease, filter .1s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink-dark); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-big { font-size: 12px; padding: 16px 22px; }

/* ---------- Header ---------- */
.site-header {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 14px 20px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-ball {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid #1a1a1a;
  background: linear-gradient(#ee1515 0 47%, #1a1a1a 47% 53%, #f0f0f0 53% 100%);
  box-shadow: 0 0 0 3px #fff, 0 3px 0 var(--shadow);
  position: relative;
}
.brand-ball::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 3px solid #1a1a1a; transform: translate(-50%, -50%);
}
.brand-text { font-family: var(--px); font-size: 11px; color: #fff;
  text-shadow: 2px 2px 0 var(--ink-dark); }
.brand-text b { color: var(--gold); }
.site-actions { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wallet-panel { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wallet-address {
  font-family: var(--px); font-size: 9px; color: var(--ink);
  background: var(--paper); border: 3px solid var(--ink);
  border-radius: 6px; padding: 8px 10px;
}
.wallet-status-bar {
  position: relative; z-index: 5; margin: 0 20px 8px;
  font-family: var(--px); font-size: 9px; color: var(--ink-dark);
  background: var(--gold); border: 3px solid var(--ink-dark);
  border-radius: 6px; padding: 8px 12px; text-align: center;
}

/* ---------- Title screen ---------- */
.title {
  position: relative; z-index: 4;
  min-height: 78vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; text-align: center;
  padding: 20px 18px 40px;
}
.title-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.title-logo-top {
  font-family: var(--px); font-size: 16px; color: #fff;
  text-shadow: 3px 3px 0 var(--gold-edge);
}
.title-logo-main {
  font-family: var(--px);
  font-size: clamp(34px, 9vw, 76px);
  color: var(--gold);
  letter-spacing: .02em;
  text-shadow:
    -4px -4px 0 var(--gold-edge), 4px -4px 0 var(--gold-edge),
    -4px 4px 0 var(--gold-edge), 4px 4px 0 var(--gold-edge),
    0 8px 0 var(--gold-edge), 8px 12px 0 var(--shadow);
  animation: logo-pop .6s ease-out both;
}
@keyframes logo-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.title-logo-sub {
  font-family: var(--px); font-size: 11px; color: #fff;
  text-shadow: 2px 2px 0 var(--ink-dark); margin-top: 8px;
}

.server-pill {
  display: inline-flex; align-items: center; gap: 9px; margin: 0;
  font-family: var(--px); font-size: 9px; color: var(--ink-dark);
  background: var(--paper); border: 3px solid var(--ink-dark);
  border-radius: 999px; padding: 8px 14px;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #c0392b;
  box-shadow: 0 0 0 2px rgba(0,0,0,.15); }
.status-dot.online { background: #2ecc40; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 2px rgba(46,204,64,.35); } 50% { box-shadow: 0 0 0 7px rgba(46,204,64,0); } }

.menu-box {
  width: min(420px, 92vw);
  display: flex; flex-direction: column; gap: 2px;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 10px;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 8px var(--paper-edge), 0 8px 0 var(--shadow);
  padding: 16px;
}
.menu-item {
  position: relative;
  font-family: var(--px); font-size: 11px; text-transform: uppercase;
  color: var(--ink-dark); background: transparent;
  border: 0; border-radius: 6px;
  text-align: left; padding: 14px 14px 14px 36px;
  cursor: pointer; width: 100%;
  transition: background .08s ease, color .08s ease;
}
.menu-item::before {
  content: "▶"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--accent); opacity: 0; transition: opacity .08s ease;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--ink); color: #fff; outline: none; }
.menu-item:hover::before, .menu-item:focus-visible::before { opacity: 1; color: var(--gold); }

.press-start {
  font-family: var(--px); font-size: 10px; color: var(--ink-dark); margin: 4px 0 0;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-actions-note {
  max-width: 540px; margin: 4px auto 0; color: #18331a;
  background: rgba(255,255,255,.7); border-radius: 8px; padding: 8px 14px;
  font-size: 20px;
}

/* ---------- Sections ---------- */
.section { position: relative; z-index: 3; max-width: 1040px; margin: 0 auto; padding: 30px 18px; }
.section-head { text-align: center; margin: 0 auto 26px; max-width: 720px; }
.kicker { font-family: var(--px); font-size: 9px; color: var(--accent);
  text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px; }
.section-head h2, .cta-band h2 { font-family: var(--px); font-size: clamp(13px, 2.6vw, 18px);
  color: var(--ink-dark); margin: 0; line-height: 1.5; }

.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card h3 { font-family: var(--px); font-size: 12px; color: var(--ink-dark); margin: 4px 0 10px; }
.card p { margin: 0; color: var(--text); }
.card-tag {
  display: inline-block; font-family: var(--px); font-size: 9px; color: #fff;
  background: var(--accent); border: 2px solid var(--ink-dark); border-radius: 5px;
  padding: 5px 8px; margin-bottom: 6px;
}
.step { padding-top: 26px; }
.step-num {
  position: absolute; top: -14px; left: 18px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--px); font-size: 12px; border-radius: 50%;
  background: var(--gold); color: var(--ink-dark); border: 2px solid var(--ink-dark);
}

/* ---------- Game Boy screen ---------- */
.gb {
  width: min(520px, 94vw); margin: 0 auto 14px;
  background: #c9c9d6; border: 4px solid #1a1a1a; border-radius: 14px 14px 26px 14px;
  box-shadow: inset 0 0 0 3px #e7e7ef, 0 8px 0 var(--shadow);
  padding: 18px 18px 26px;
}
.gb-screen {
  background: #0a1020; border: 4px solid #21283b; border-radius: 8px;
  padding: 8px; box-shadow: inset 0 0 18px rgba(0,0,0,.6);
}
.gb-screen img { display: block; width: 100%; height: auto; border-radius: 3px; }
.gb-brand { font-family: var(--px); font-size: 9px; color: #6a6a7a; text-align: center; margin-top: 12px; }
.gb-brand span { color: var(--accent); }
.gb-caption { width: min(520px, 94vw); margin: 0 auto 24px; text-align: center; padding: 14px 18px; }

.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px;
  max-width: 720px; margin: 0 auto;
}
.shot-card {
  position: relative; cursor: pointer; overflow: hidden;
  border: 3px solid var(--ink-dark); border-radius: 8px; background: #0a1020;
  box-shadow: 0 4px 0 var(--shadow); transition: transform .08s ease;
}
.shot-card img { display: block; width: 100%; height: 84px; object-fit: cover; }
.shot-card:hover { transform: translateY(-3px); }
.shot-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--gold), 0 4px 0 var(--shadow); }
.shot-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-family: var(--px); font-size: 8px; color: #fff;
  background: rgba(26,33,59,.82); padding: 5px 6px; text-align: center;
}

/* ---------- CTA ---------- */
.cta-band { text-align: center; margin-top: 28px; }
.cta-band p { color: var(--text); margin: 12px 0 18px; }
.cta-actions { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; z-index: 3;
  max-width: 760px; margin: 30px auto; text-align: center;
}
.site-footer p { margin: 4px 0; font-family: var(--px); font-size: 9px; color: var(--ink-dark); }
.site-footer-note { color: var(--muted) !important; }

/* ---------- Trainer-name modal ---------- */
.username-modal { position: fixed; inset: 0; z-index: 50; display: flex;
  align-items: center; justify-content: center; padding: 18px; }
.username-modal[hidden] { display: none; }
.username-modal-backdrop { position: absolute; inset: 0; background: rgba(10,16,32,.72); }
.username-modal-panel { position: relative; width: min(460px, 96vw); }
.username-modal-kicker { font-family: var(--px); font-size: 9px; color: var(--accent);
  text-transform: uppercase; margin: 0 0 10px; }
.username-modal-panel h2 { font-family: var(--px); font-size: 14px; color: var(--ink-dark); margin: 0 0 10px; line-height: 1.5; }
.username-modal-desc { color: var(--text); margin: 0 0 16px; }
.username-modal-form { display: flex; flex-direction: column; gap: 10px; }
.username-modal-label { font-family: var(--px); font-size: 9px; color: var(--ink-dark); text-transform: uppercase; }
#username-modal-input {
  font-family: var(--body); font-size: 24px; color: var(--text);
  background: #fff; border: 3px solid var(--ink); border-radius: 6px; padding: 10px 12px;
}
#username-modal-input:focus { outline: none; border-color: var(--accent); }
.username-modal-hint { font-size: 18px; color: var(--muted); margin: 0; }
.username-modal-error { font-size: 18px; color: var(--accent-dark); margin: 0; }
.username-modal-error[hidden] { display: none; }
.btn-play { margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  body { font-size: 20px; }
  .brand-text { font-size: 9px; }
  .title { min-height: 70vh; }
  .ow-grass { height: 34vh; }
}
