/* ==========================================================================
   Hanna Online - Core Base Stylesheet (style-ed36.css)
   Brand palette: #DCDCDC | #0000CD | #6495ED | #1C2833 | #FAF0E6
   Dark backdrop #1C2833, light text #FAF0E6, royal blue #0000CD,
   cornflower accent #6495ED, soft silver #DCDCDC.
   All custom classes use the g361- prefix.
   ========================================================================== */

:root {
  --g361-bg: #1C2833;
  --g361-bg-2: #141c25;
  --g361-bg-3: #20303f;
  --g361-card: #243341;
  --g361-text: #FAF0E6;
  --g361-muted: #c5cbd1;
  --g361-blue: #0000CD;
  --g361-cornflower: #6495ED;
  --g361-silver: #DCDCDC;
  --g361-gold: #f3c969;
  --g361-border: rgba(120, 144, 168, 0.25);
  --g361-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --g361-radius: 14px;
  --g361-max: 430px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 62.5%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--g361-bg);
  color: var(--g361-text);
  line-height: 1.5;
  font-size: 1.4rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--g361-cornflower); text-decoration: none; }
a:hover { color: var(--g361-silver); }
img { max-width: 100%; display: block; }

.g361-wrap {
  width: 100%;
  max-width: var(--g361-max);
  margin: 0 auto;
  position: relative;
}

/* ---------------- Header ---------------- */
.g361-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #0c1219 0%, #1C2833 55%, #20303f 100%);
  border-bottom: 1px solid var(--g361-border);
  box-shadow: var(--g361-shadow);
}
.g361-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 10px;
}
.g361-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: 0.4px;
  color: var(--g361-text);
}
.g361-logo img { width: 30px; height: 30px; border-radius: 6px; }
.g361-logo span small { display: block; font-size: 1rem; font-weight: 500; color: var(--g361-cornflower); }

.g361-header-actions { display: flex; align-items: center; gap: 8px; }
.g361-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.25rem;
  padding: 9px 14px;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.g361-btn:active { transform: scale(0.96); }
.g361-btn-login {
  background: transparent;
  color: var(--g361-text);
  border: 1px solid var(--g361-cornflower);
}
.g361-btn-login:hover { background: rgba(100,149,237,0.15); }
.g361-btn-register {
  background: linear-gradient(135deg, #0000CD 0%, #6495ED 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,205,0.4);
}
.g361-btn-register:hover { filter: brightness(1.08); }

.g361-menu-toggle {
  background: transparent;
  border: 0;
  color: var(--g361-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

/* ---------------- Mobile Menu ---------------- */
.g361-mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(8,12,18,0.86);
  z-index: 9999;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
}
.g361-mobile-menu.g361-open { display: flex; }
.g361-mobile-menu-panel {
  width: 86%;
  max-width: 360px;
  background: var(--g361-bg-2);
  border-left: 1px solid var(--g361-border);
  padding: 22px 18px;
  overflow-y: auto;
}
.g361-mobile-menu-panel h3 {
  font-size: 1.3rem;
  color: var(--g361-cornflower);
  margin: 16px 0 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.g361-mobile-menu-panel a {
  display: block;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(120,144,168,0.12);
  color: var(--g361-text);
  font-size: 1.35rem;
}
.g361-mobile-menu-panel a:hover { color: var(--g361-cornflower); }
.g361-menu-close {
  background: transparent;
  border: 0;
  color: var(--g361-text);
  font-size: 2rem;
  cursor: pointer;
  float: right;
}

/* ---------------- Hero / Carousel ---------------- */
.g361-hero {
  position: relative;
  border-radius: var(--g361-radius);
  overflow: hidden;
  margin: 14px 0;
  box-shadow: var(--g361-shadow);
}
.g361-hero-track {
  display: flex;
  transition: transform .45s ease;
}
.g361-hero-slide {
  flex: 0 0 100%;
  position: relative;
}
.g361-hero-slide img { width: 100%; height: 200px; object-fit: cover; }
.g361-hero-cap {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.7), rgba(0,0,0,0));
  padding: 18px 14px 12px;
  border-radius: 10px;
  color: #fff;
}
.g361-hero-cap h2 { font-size: 1.9rem; font-weight: 800; margin-bottom: 4px; }
.g361-hero-cap p { font-size: 1.2rem; color: var(--g361-silver); }
.g361-hero-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.g361-hero-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
}
.g361-hero-dots span.g361-active { background: var(--g361-cornflower); }

/* ---------------- Section base ---------------- */
.g361-section { padding: 18px 14px; }
.g361-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.g361-section-head h2 {
  font-size: 1.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.g361-section-head h2 i { color: var(--g361-gold); }
.g361-section-head a { font-size: 1.2rem; color: var(--g361-cornflower); }

.g361-cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.g361-cat-tabs::-webkit-scrollbar { display: none; }
.g361-cat-tabs button {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--g361-border);
  background: var(--g361-card);
  color: var(--g361-text);
  font-size: 1.2rem;
  cursor: pointer;
  white-space: nowrap;
}
.g361-cat-tabs button.g361-active {
  background: linear-gradient(135deg, #0000CD, #6495ED);
  border-color: transparent;
  color: #fff;
}

/* ---------------- Game grid ---------------- */
.g361-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.g361-card {
  background: var(--g361-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--g361-border);
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
}
.g361-card:hover { transform: translateY(-3px); box-shadow: var(--g361-shadow); }
.g361-card-img {
  position: relative;
  aspect-ratio: 1/1;
  background: #0e151d;
}
.g361-card-img img { width: 100%; height: 100%; object-fit: cover; }
.g361-card-tag {
  position: absolute;
  top: 6px; left: 6px;
  background: rgba(0,0,205,0.85);
  color: #fff;
  font-size: 0.95rem;
  padding: 2px 8px;
  border-radius: 999px;
}
.g361-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 2rem;
  opacity: 0;
  transition: opacity .2s ease;
}
.g361-card:hover .g361-card-play { opacity: 1; }
.g361-card-name {
  padding: 8px 8px 10px;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  color: var(--g361-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Featured 2-col layout */
.g361-featured {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.g361-featured .g361-card-img { aspect-ratio: 4/5; }

/* ---------------- Promo CTA strip ---------------- */
.g361-cta {
  background: linear-gradient(135deg, #0000CD 0%, #6495ED 100%);
  border-radius: var(--g361-radius);
  padding: 16px;
  color: #fff;
  margin: 16px 14px;
  box-shadow: 0 8px 24px rgba(0,0,205,0.35);
}
.g361-cta h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.g361-cta p { font-size: 1.2rem; opacity: 0.92; margin-bottom: 10px; }
.g361-cta .g361-btn { background: #fff; color: #0000CD; }

/* ---------------- Partners strip ---------------- */
.g361-partners {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 6px 4px 14px;
}
.g361-partners img {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
  aspect-ratio: 2/1;
  object-fit: contain;
}

/* ---------------- Article / SEO text ---------------- */
.g361-article {
  background: var(--g361-bg-3);
  border-radius: var(--g361-radius);
  padding: 18px;
  border: 1px solid var(--g361-border);
  margin: 14px;
}
.g361-article h2 {
  font-size: 1.8rem;
  color: var(--g361-cornflower);
  margin: 14px 0 8px;
  font-weight: 800;
}
.g361-article h2:first-child { margin-top: 0; }
.g361-article h3 {
  font-size: 1.4rem;
  color: var(--g361-gold);
  margin: 12px 0 6px;
  font-weight: 700;
}
.g361-article p {
  font-size: 1.3rem;
  color: var(--g361-muted);
  margin-bottom: 10px;
}
.g361-article ul, .g361-article ol {
  padding-left: 18px;
  margin-bottom: 10px;
  color: var(--g361-muted);
  font-size: 1.3rem;
}
.g361-article li { margin-bottom: 6px; }
.g361-article a { color: var(--g361-cornflower); text-decoration: underline; }

.g361-faq details {
  background: var(--g361-card);
  border: 1px solid var(--g361-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.g361-faq summary {
  font-weight: 700;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--g361-text);
  list-style: none;
}
.g361-faq summary::-webkit-details-marker { display: none; }
.g361-faq summary::before {
  content: "Q ";
  color: var(--g361-gold);
  font-weight: 800;
}
.g361-faq details[open] summary { color: var(--g361-cornflower); }
.g361-faq p { font-size: 1.25rem; color: var(--g361-muted); margin-top: 8px; }

/* ---------------- Footer ---------------- */
.g361-footer {
  background: var(--g361-bg-2);
  border-top: 1px solid var(--g361-border);
  padding: 20px 14px 100px;
}
.g361-footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.g361-footer-col h4 {
  font-size: 1.25rem;
  color: var(--g361-cornflower);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.g361-footer-col a {
  display: block;
  font-size: 1.2rem;
  color: var(--g361-muted);
  padding: 4px 0;
}
.g361-footer-col a:hover { color: var(--g361-cornflower); }
.g361-footer-bottom {
  text-align: center;
  font-size: 1.15rem;
  color: var(--g361-muted);
  padding-top: 12px;
  border-top: 1px solid var(--g361-border);
}
.g361-disclaimer {
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  padding: 10px;
  font-size: 1.1rem;
  color: var(--g361-muted);
  margin-bottom: 12px;
  line-height: 1.45;
}

/* ---------------- Mobile bottom nav ---------------- */
.g361-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: linear-gradient(180deg, #20303f 0%, #0c1219 100%);
  border-top: 1px solid var(--g361-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.45);
}
.g361-bottom-nav button,
.g361-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: 0;
  color: var(--g361-muted);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
}
.g361-bottom-nav button:active,
.g361-bottom-nav a:active { transform: scale(0.92); }
.g361-bottom-nav .g361-nav-icon { font-size: 2.1rem; line-height: 1; }
.g361-bottom-nav .material-icons.g361-nav-icon { font-size: 22px; }
.g361-bottom-nav button.g361-active,
.g361-bottom-nav a.g361-active { color: var(--g361-cornflower); }
.g361-bottom-nav .g361-nav-promo { color: var(--g361-gold); }

/* Desktop: hide bottom nav, widen wrap */
@media (min-width: 769px) {
  .g361-bottom-nav { display: none; }
  .g361-wrap { max-width: 760px; }
  .g361-grid { grid-template-columns: repeat(5, 1fr); }
  .g361-featured { grid-template-columns: repeat(3, 1fr); }
  .g361-partners { grid-template-columns: repeat(7, 1fr); }
  .g361-footer-cols { grid-template-columns: repeat(4, 1fr); }
  .g361-footer { padding-bottom: 24px; }
}

/* Mobile: padding so content isn't hidden behind bottom nav */
@media (max-width: 768px) {
  main { padding-bottom: 80px; }
  .g361-hero-slide img { height: 180px; }
}

/* Utility */
.g361-hide { display: none !important; }
.g361-mt { margin-top: 12px; }
.g361-text-center { text-align: center; }
.g361-nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
