/* PH22 Mobile App Shell & Casino Design System */
:root {
  --primary: #fbbf24;
  --primary-ink: #1a1206;
  --accent: #dc2626;
  --accent-ink: #ffffff;
  --tertiary: #2563eb;
  --bg: #0c0a09;
  --surface: #1a1410;
  --surface-card: #221a14;
  --line: #3d2a1a;
  --ink: #fef3c7;
  --muted: #c9a86c;
  --glow: rgba(251, 191, 36, 0.15);
  --radius-card: 12px;
  --radius-btn: 10px;
  --radius-pill: 9999px;
  --font-sans: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Archivo Narrow', 'Manrope', system-ui, sans-serif;
}

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

body {
  background: #1a1a1a;
  display: flex;
  justify-content: center;
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* App Shell Desktop Center vs Native Mobile Fullscreen */
.app-shell {
  width: 100%;
  max-width: 430px;
  background: var(--bg);
  min-height: 100vh;
  padding-bottom: 84px;
  position: relative;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
}

/* Sticky Header */
.hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(12, 10, 9, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
}

.hdr-brand {
  display: flex;
  align-items: center;
}

.hdr-brand img {
  height: 34px;
  width: auto;
  display: block;
}

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

/* CTA Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-height: 40px;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1a1206;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.4);
  color: #1a1206;
}

.btn-login {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-login:hover {
  background: rgba(251, 191, 36, 0.1);
  color: var(--primary);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--ink);
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: var(--radius-btn);
  min-height: 32px;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Compliance Badges (Strictly div or p, zero heading tags) */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #fca5a5;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pill-badge-info {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--primary);
}

.compliance-notice {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 6px 0 0 0;
}

/* Main Body & Layout */
.main {
  padding: 14px 16px;
  flex: 1;
}

/* Hero Section */
.hero {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 430/220;
  object-fit: cover;
  display: block;
}

.hero-content {
  padding: 16px;
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.8) 0%, rgba(12, 10, 9, 1) 100%);
}

.hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.25;
}

.hero-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}

/* Section Header */
.sec-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 22px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.sec-hdr h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.sec-hdr a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
}

/* 3x2 Interactive Game Grid */
.game-grid-3x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 360px) {
  .game-grid-3x2 {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

.game-card {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.4);
}

.game-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background: #120e0b;
  overflow: hidden;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(12, 10, 9, 0.85);
  color: var(--primary);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  text-transform: uppercase;
}

.game-info {
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.game-studio {
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.game-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
}

.btn-game-play {
  background: linear-gradient(135deg, var(--primary), #d97706);
  color: #1a1206;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 0;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-game-play:hover {
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
  color: #1a1206;
}

.btn-game-guide {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 0;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-game-guide:hover {
  border-color: var(--muted);
  color: var(--primary);
}

/* Fixed Bottom Bar (5 Touch Tabs) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(18, 14, 11, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 0 calc(10px + env(safe-area-inset-bottom));
  z-index: 100;
  border-top: 1px solid var(--line);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  gap: 2px;
  min-height: 48px;
  transition: color 0.18s ease;
}

.nav-tab.active, .nav-tab:hover {
  color: var(--primary);
}

.nav-tab em {
  font-size: 1.25rem;
  font-style: normal;
  line-height: 1;
}

.nav-tab.nav-cta em {
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  border-radius: 50%;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.35);
}

/* Compliance Footer */
.compliance-footer {
  background: #080605;
  border-top: 1px solid var(--line);
  padding: 24px 16px;
  text-align: center;
  margin-top: 30px;
}

.compliance-footer p {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.compliance-footer a {
  color: var(--primary);
  text-decoration: none;
}
