/* ===================================================================
   RAJA GAME 2 - Royal Emerald & Ivory Editorial Mobile Portal
   Distinct Layout, Palette & Component System
=================================================================== */

:root {
  --outer-bg: #e7f3ed;
  --shell-bg: #f8fcfa;
  --card-bg: #ffffff;
  --emerald-deep: #064e3b;
  --emerald-main: #059669;
  --emerald-soft: #ecfdf5;
  --amber-gold: #b45309;
  --amber-soft: #fef3c7;

  --text-strong: #0f172a;
  --text-normal: #334155;
  --text-light: #64748b;
  --border-soft: #d1fae5;
  --border-card: #dbe7e1;

  --shell-max: 480px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 9999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background: linear-gradient(180deg, #dff0e8 0%, #f1f7f4 100%);
  color: var(--text-strong);
  line-height: 1.65;
  min-height: 100vh;
}

a {
  color: var(--emerald-deep);
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.rg2-shell {
  width: 100%;
  max-width: var(--shell-max);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--shell-bg);
  border-left: 1px solid var(--border-card);
  border-right: 1px solid var(--border-card);
  box-shadow: 0 12px 42px rgba(6, 78, 59, 0.12);
  display: flex;
  flex-direction: column;
  padding-bottom: 86px;
  position: relative;
}

/* TOP TICKER */
.rg2-ticker {
  background: var(--emerald-deep);
  color: #ecfdf5;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rg2-ticker strong {
  color: #fde68a;
}

/* STICKY HEADER */
.rg2-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  height: 62px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rg2-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rg2-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--emerald-main);
}

.rg2-brand-name {
  display: block;
  font-size: 1rem;
  font-weight: 900;
  color: var(--emerald-deep);
  line-height: 1.1;
}

.rg2-brand-tag {
  display: block;
  font-size: 0.68rem;
  color: var(--text-light);
  font-weight: 600;
}

.rg2-top-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rg2-join-sm {
  background: var(--emerald-main);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28);
}

.rg2-join-sm:hover {
  background: var(--emerald-deep);
  color: #fff;
}

.rg2-burger {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-card);
  background: var(--emerald-soft);
  color: var(--emerald-deep);
  font-size: 1.15rem;
  cursor: pointer;
}

/* MENU PANEL */
.rg2-menu-panel {
  position: absolute;
  top: 62px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 2px solid var(--emerald-main);
  padding: 12px 14px;
  display: none;
  flex-direction: column;
  gap: 7px;
  z-index: 890;
  box-shadow: 0 14px 28px rgba(6, 78, 59, 0.14);
}

.rg2-menu-panel.is-open {
  display: flex;
}

.rg2-menu-panel a {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--shell-bg);
  color: var(--text-strong);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}

.rg2-menu-panel a.active,
.rg2-menu-panel a:hover {
  background: var(--emerald-soft);
  color: var(--emerald-deep);
}

/* MAIN WRAP */
.rg2-container {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* FEATURED EDITORIAL HERO */
.rg2-hero {
  background: var(--card-bg);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(6, 78, 59, 0.08);
}

.rg2-hero-banner {
  position: relative;
}

.rg2-hero-banner img {
  width: 100%;
  height: auto;
}

.rg2-hero-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(6, 78, 59, 0.92);
  color: #fde68a;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(253, 230, 138, 0.5);
}

.rg2-hero-body {
  padding: 16px 14px;
}

.rg2-hero-body h1 {
  font-size: 1.24rem;
  line-height: 1.25;
  font-weight: 900;
  color: var(--emerald-deep);
  margin-bottom: 8px;
}

.rg2-hero-body p {
  font-size: 0.87rem;
  color: var(--text-normal);
  margin-bottom: 12px;
}

.rg2-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--amber-soft);
  border: 1px solid #fcd34d;
  border-radius: var(--r-sm);
  padding: 9px 12px;
  margin-bottom: 12px;
}

.rg2-code-row span {
  font-size: 0.78rem;
  color: var(--amber-gold);
  font-weight: 700;
}

.rg2-code-row strong {
  display: block;
  font-size: 0.96rem;
  color: var(--text-strong);
}

.rg2-copy-btn {
  border: none;
  background: var(--emerald-deep);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
}

.rg2-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #059669 0%, #065f46 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.28);
}

.rg2-btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
}

.rg2-btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--emerald-main);
  color: var(--emerald-deep);
  font-size: 0.85rem;
  font-weight: 800;
  margin-top: 9px;
}

/* SWIPEABLE SLIDER DECK (DIFFERENT FROM TAB GALLERY) */
.rg2-deck-card {
  background: var(--card-bg);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 14px;
}

.rg2-deck-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rg2-deck-top h2 {
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--emerald-deep);
}

.rg2-deck-controls {
  display: flex;
  gap: 6px;
}

.rg2-deck-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-card);
  background: var(--emerald-soft);
  color: var(--emerald-deep);
  font-weight: 900;
  cursor: pointer;
}

.rg2-viewport {
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--border-card);
}

.rg2-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.rg2-slide {
  min-width: 100%;
  background: var(--shell-bg);
}

.rg2-slide img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.rg2-slide.portrait img {
  height: 280px;
  object-fit: contain;
  background: #f0fdf4;
  padding: 8px;
}

.rg2-slide-note {
  padding: 9px 12px;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--emerald-deep);
  background: #fff;
  border-top: 1px solid var(--border-card);
}

/* STATS ROW */
.rg2-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.rg2-kpi {
  background: var(--card-bg);
  border: 1px solid var(--border-card);
  border-radius: var(--r-md);
  padding: 11px 8px;
  text-align: center;
}

.rg2-kpi strong {
  display: block;
  font-size: 0.94rem;
  color: var(--emerald-main);
}

.rg2-kpi span {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 600;
}

/* EDITORIAL SECTION CARD */
.rg2-box {
  background: var(--card-bg);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 16px 14px;
}

.rg2-box h2 {
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--emerald-deep);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--emerald-soft);
}

.rg2-box h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-strong);
  margin: 12px 0 6px;
}

.rg2-box p {
  font-size: 0.87rem;
  color: var(--text-normal);
  margin-bottom: 10px;
}

.rg2-box p:last-child {
  margin-bottom: 0;
}

.rg2-box ul,
.rg2-box ol {
  padding-left: 18px;
  color: var(--text-normal);
  font-size: 0.86rem;
  margin-bottom: 10px;
}

.rg2-box li {
  margin-bottom: 6px;
}

/* COMPARISON TABLE */
.rg2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.rg2-table tr {
  border-bottom: 1px solid var(--border-soft);
}

.rg2-table td {
  padding: 9px 4px;
}

.rg2-table td:first-child {
  color: var(--text-light);
  font-weight: 600;
}

.rg2-table td:last-child {
  color: var(--emerald-deep);
  font-weight: 800;
  text-align: right;
}

/* FAQ */
.rg2-faq-item {
  border: 1px solid var(--border-card);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--shell-bg);
}

.rg2-faq-item.open {
  background: #fff;
  border-color: var(--emerald-main);
}

.rg2-faq-btn {
  width: 100%;
  background: transparent;
  border: none;
  padding: 12px;
  text-align: left;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.rg2-faq-ans {
  max-height: 0;
  overflow: hidden;
  padding: 0 12px;
  font-size: 0.82rem;
  color: var(--text-normal);
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.rg2-faq-item.open .rg2-faq-ans {
  max-height: 240px;
  padding: 0 12px 12px;
}

/* PAGE LINKS */
.rg2-links-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rg2-links-col a {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--emerald-soft);
  color: var(--emerald-deep);
  font-size: 0.86rem;
  font-weight: 700;
}

/* FOOTER */
.rg2-footer {
  margin-top: auto;
  padding: 18px 14px;
  background: var(--emerald-deep);
  color: #d1fae5;
  text-align: center;
}

.rg2-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.rg2-footer-nav a {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}

.rg2-footer p {
  font-size: 0.72rem;
  color: #a7f3d0;
  margin-bottom: 4px;
}

/* BOTTOM MOBILE BAR */
.rg2-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--shell-max);
  height: 64px;
  background: #fff;
  border-top: 2px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 950;
}

.rg2-btab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--text-light);
}

.rg2-btab.active {
  color: var(--emerald-deep);
}

.rg2-btab .ico {
  font-size: 1.1rem;
}

.rg2-btab-main {
  position: relative;
  top: -12px;
}

.rg2-btab-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--emerald-main);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 3px solid #fff;
  box-shadow: 0 5px 14px rgba(5, 150, 105, 0.38);
}
