/* ==========================================================================
   KATAKU WEB PORTAL & DASHBOARD — MODERN GLASSMORPHIC DARK DESIGN SYSTEM
   Base URL Target: kataku.masfuad.my.id
   ========================================================================== */

:root {
  /* Core Color Palette */
  --bg-main: #0B0F19;
  --bg-card: rgba(18, 26, 43, 0.75);
  --bg-card-hover: rgba(26, 38, 64, 0.9);
  --bg-card-solid: #111927;
  --bg-input: rgba(11, 15, 25, 0.85);

  /* Brand Accents */
  --wordle-green: #10B981;
  --wordle-green-glow: rgba(16, 185, 129, 0.25);
  --wordle-yellow: #F59E0B;
  --wordle-yellow-glow: rgba(245, 158, 11, 0.25);
  --wordle-gray: #334155;
  --wordle-gray-border: #475569;

  --accent-cyan: #06B6D4;
  --accent-blue: #3B82F6;
  --accent-purple: #8B5CF6;
  --accent-rose: #F43F5E;
  --accent-gold: #FBBF24;

  /* Text Colors */
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --text-light: #FFFFFF;

  /* Borders & Gradients */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(16, 185, 129, 0.5);
  --glass-blur: blur(16px);
  --card-radius: 16px;
  --pill-radius: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
}

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

code, pre, .mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Ambient Glow Background Orbs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  top: -100px;
  left: 10%;
}
.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  bottom: 10%;
  right: 5%;
}
.glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  top: 40%;
  left: 30%;
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
}

.nav-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-tiles {
  display: flex;
  gap: 3px;
}

.logo-tiles .tile {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  border-radius: 4px;
  color: #fff;
}

.tile.green { background-color: var(--wordle-green); box-shadow: 0 2px 8px var(--wordle-green-glow); }
.tile.yellow { background-color: var(--wordle-yellow); box-shadow: 0 2px 8px var(--wordle-yellow-glow); }

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #FFFFFF 0%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--accent-cyan);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: var(--pill-radius);
  font-size: 0.75rem;
  font-weight: 600;
  color: #34D399;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--wordle-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--wordle-green);
  animation: pulseAnim 2s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--wordle-green); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: var(--pill-radius);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--pill-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 182, 212, 0.25) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.badge-new {
  font-size: 0.6rem;
  font-weight: 800;
  background: var(--wordle-green);
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--wordle-green) 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #34D399 0%, var(--wordle-green) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
}

.btn-block {
  width: 100%;
  padding: 12px;
}

/* ==========================================================================
   MAIN LAYOUT & HERO BANNER
   ========================================================================== */
.main-content {
  max-width: 1360px;
  margin: 0 auto;
  padding: 30px 24px 60px;
  position: relative;
  z-index: 1;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(18, 26, 43, 0.8) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 32px 36px;
  backdrop-filter: var(--glass-blur);
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: 0; right: 0; width: 300px; height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.08), transparent 70%);
  pointer-events: none;
}

.banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 12px;
  border-radius: var(--pill-radius);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-gold);
  border-radius: 50%;
  animation: pulseGold 1.5s infinite;
}

@keyframes pulseGold {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.gradient-text {
  background: linear-gradient(135deg, #10B981 0%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 820px;
  margin-bottom: 24px;
}

.stats-ribbon {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 16px;
}

.ribbon-card {
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 18px;
}

.ribbon-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ribbon-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.trend.up {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--wordle-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.subtext {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
}

.countdown-timer {
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 42px;
}

.time-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.time-unit {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}

.time-sep {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dim);
}

/* ==========================================================================
   CONTENT SECTIONS & SUB-TABS
   ========================================================================== */
.content-section {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.content-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.section-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.sub-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--pill-radius);
  padding: 4px;
  gap: 4px;
}

.sub-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--pill-radius);
  cursor: pointer;
  transition: var(--transition);
}

.sub-tab:hover {
  color: var(--text-main);
}

.sub-tab.active {
  background: var(--bg-card-hover);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.sub-view {
  display: none;
}
.sub-view.active {
  display: block;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 24px;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* ==========================================================================
   PODIUM & TOURNAMENT STANDINGS
   ========================================================================== */
.podium-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 28px;
}

.podium-card {
  background: linear-gradient(180deg, rgba(26, 38, 64, 0.8) 0%, rgba(18, 26, 43, 0.9) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.podium-card.rank-1 {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
  transform: translateY(-8px);
}

.podium-card.rank-2 {
  border-color: rgba(148, 163, 184, 0.3);
}

.podium-card.rank-3 {
  border-color: rgba(217, 119, 6, 0.3);
}

.podium-crown {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.player-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  border: 3px solid;
}

.avatar-gold { background: #78350F; border-color: #FBBF24; box-shadow: 0 0 15px rgba(251, 191, 36, 0.4); }
.avatar-silver { background: #334155; border-color: #94A3B8; }
.avatar-bronze { background: #451A03; border-color: #D97706; }

.player-name {
  font-size: 1.15rem;
  font-weight: 800;
}

.player-handle {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 8px;
}

.player-honor-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--pill-radius);
  margin-bottom: 12px;
}

.player-tier-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--pill-radius);
  margin-bottom: 12px;
  color: var(--text-main);
}

.podium-score {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.podium-score .score-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--wordle-green);
}

.podium-score .score-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}

.podium-footer {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* ==========================================================================
   DATA TABLES
   ========================================================================== */
.table-card {
  padding: 0;
  overflow: hidden;
}

.table-toolbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 320px;
  flex: 1;
}

.search-icon {
  font-size: 0.9rem;
}

.input-search {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  width: 100%;
}

.select-control {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.rank-badge {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.rank-badge.top-1 { background: var(--wordle-yellow); color: #000; }
.rank-badge.top-2 { background: #94A3B8; color: #000; }
.rank-badge.top-3 { background: #D97706; color: #fff; }

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.user-name-title {
  font-weight: 700;
  color: #fff;
}

.user-username {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

.score-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  color: var(--wordle-green);
  font-size: 1rem;
}

/* Info Card Grid */
.info-card-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.info-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 18px;
  border-radius: 12px;
}

.info-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.info-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.info-box p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   INTERACTIVE WORDLE GAME SIMULATOR
   ========================================================================== */
.length-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-len {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--pill-radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-len:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-len.active {
  background: var(--wordle-green);
  color: #000;
  border-color: var(--wordle-green);
  box-shadow: 0 4px 12px var(--wordle-green-glow);
}

.game-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.game-board-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-status-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-subtle);
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

.game-info-item {
  display: flex;
  gap: 6px;
}

.g-label { color: var(--text-muted); }
.g-val { font-weight: 700; }

.clue-reveal-bar {
  width: 100%;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  margin-bottom: 24px;
  color: var(--accent-gold);
}

/* Wordle Tile Grid */
.wordle-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.grid-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.tile-box {
  width: 54px;
  height: 54px;
  border: 2px solid var(--wordle-gray-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.6rem;
  text-transform: uppercase;
  color: #fff;
  transition: transform 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
  user-select: none;
}

.tile-box.filled {
  border-color: rgba(255, 255, 255, 0.4);
  animation: popIn 0.15s ease forwards;
}

@keyframes popIn {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.tile-box.green {
  background-color: var(--wordle-green);
  border-color: var(--wordle-green);
  box-shadow: 0 4px 10px var(--wordle-green-glow);
}

.tile-box.yellow {
  background-color: var(--wordle-yellow);
  border-color: var(--wordle-yellow);
  box-shadow: 0 4px 10px var(--wordle-yellow-glow);
}

.tile-box.gray {
  background-color: var(--wordle-gray);
  border-color: var(--wordle-gray);
}

/* Virtual Keyboard */
.virtual-keyboard {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.kb-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.key-btn {
  height: 48px;
  min-width: 34px;
  flex: 1;
  background: #1E293B;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  user-select: none;
}

.key-btn:hover {
  background: #334155;
}

.key-btn:active {
  transform: scale(0.94);
}

.key-btn.wide {
  flex: 1.5;
  font-size: 0.8rem;
}

.key-btn.green { background: var(--wordle-green); border-color: var(--wordle-green); }
.key-btn.yellow { background: var(--wordle-yellow); border-color: var(--wordle-yellow); }
.key-btn.gray { background: #111827; color: #475569; border-color: #1F2937; }

/* Hints Toolbar */
.hints-toolbar {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hint {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-hint:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.side-card {
  margin-bottom: 20px;
}

.side-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.rule-color-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.tile-sample {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  color: #fff;
}

.tile-sample.green { background: var(--wordle-green); }
.tile-sample.yellow { background: var(--wordle-yellow); }
.tile-sample.gray { background: var(--wordle-gray); }

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

/* ==========================================================================
   DICTIONARY & KBBI EXPLORATION
   ========================================================================== */
.exploration-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.gauge-card {
  padding: 16px;
}

.gauge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.gauge-title {
  font-size: 0.8rem;
  font-weight: 700;
}

.gauge-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 800;
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--wordle-green);
  border-radius: 4px;
  transition: width 0.8s ease;
}

.progress-bar-fill.bg-cyan { background: var(--accent-cyan); }
.progress-bar-fill.bg-amber { background: var(--wordle-yellow); }
.progress-bar-fill.bg-purple { background: var(--accent-purple); }
.progress-bar-fill.bg-rose { background: var(--accent-rose); }

.gauge-footer {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-alert-good { color: var(--wordle-green); font-weight: 700; }
.badge-alert-warn { color: var(--wordle-yellow); font-weight: 700; }

.filter-pills {
  display: flex;
  gap: 6px;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--pill-radius);
  cursor: pointer;
  transition: var(--transition);
}

.pill-btn:hover {
  color: #fff;
}

.pill-btn.active {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   FORMS & TELEGRAM PREVIEWS
   ========================================================================== */
.form-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.input-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.input-control:focus {
  border-color: var(--wordle-green);
  box-shadow: 0 0 0 3px var(--wordle-green-glow);
}

.input-control.uppercase {
  text-transform: uppercase;
  letter-spacing: 1px;
}

.input-with-action {
  display: flex;
  gap: 8px;
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-row .col {
  flex: 1;
}

.form-help {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
  display: block;
}

/* Telegram Message Box Preview */
.tg-preview-box {
  background: #17212B;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
}

.tg-avatar {
  width: 34px;
  height: 34px;
  background: var(--accent-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 0.85rem;
}

.tg-avatar-bot {
  background: linear-gradient(135deg, var(--wordle-green), var(--accent-cyan));
}

.tg-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #58A6FF;
}

.tg-name span {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.75rem;
}

.tg-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.tg-body {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #F0F6FC;
}

.tg-body code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #58A6FF;
}

/* ==========================================================================
   SPONSOR EVENT CARD
   ========================================================================== */
.sponsor-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tag-status.live {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #FB7185;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.sponsor-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.sponsor-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
  background: rgba(0, 0, 0, 0.25);
  padding: 14px;
  border-radius: 10px;
}

.sm-item {
  display: flex;
  flex-direction: column;
}

.sm-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.sm-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sponsor-links-box {
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sl-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 6px;
}

/* Sponsor Alert Banner in Leaderboard */
.sponsor-event-alert {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--card-radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}

.sponsor-badge {
  background: var(--accent-purple);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--pill-radius);
  align-self: flex-start;
}

.sponsor-info {
  flex: 1;
}

.sponsor-info h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.sponsor-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sponsor-timer {
  text-align: right;
}

.s-label { font-size: 0.72rem; color: var(--text-muted); display: block; }
.s-val { font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 1.1rem; }

/* ==========================================================================
   MODALS & TOAST NOTIFICATIONS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease forwards;
}

.modal-overlay.open {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-card.modal-sm { max-width: 400px; }

@keyframes modalSlideUp {
  from { transform: translateY(20px) scale(0.97); }
  to { transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover { color: #fff; }

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(18, 26, 43, 0.95);
  border: 1px solid var(--border-focus);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease forwards;
  pointer-events: auto;
}

@keyframes toastIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(11, 15, 25, 0.9);
  padding: 40px 24px;
  margin-top: 60px;
  position: relative;
  z-index: 1;
}

.footer-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.footer-left p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.copyright {
  font-size: 0.75rem !important;
  color: var(--text-dim) !important;
  margin-top: 6px;
}

.footer-right {
  display: flex;
  gap: 20px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--wordle-green);
}

/* ==========================================================================
   UTILITY CLASSES & BADGES
   ========================================================================== */
.text-green { color: var(--wordle-green) !important; }
.text-amber { color: var(--wordle-yellow) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-gold { color: var(--accent-gold) !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-green { background: rgba(16, 185, 129, 0.15); color: var(--wordle-green); }
.badge-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.badge-purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }

/* Hall of Fame Cards */
.hof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hof-card {
  background: var(--bg-card);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--card-radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.hof-card::before {
  content: '👑';
  position: absolute;
  top: 10px; right: 15px;
  font-size: 2.5rem;
  opacity: 0.15;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET BREAKPOINTS)
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-tabs {
    display: none; /* In mobile, tabs collapse or scroll */
  }
  .stats-ribbon {
    grid-template-columns: 1fr 1fr;
  }
  .game-wrapper {
    grid-template-columns: 1fr;
  }
  .exploration-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .podium-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .podium-card.rank-1 {
    order: -1;
    transform: none;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 10px 16px;
  }
  .main-content {
    padding: 16px 14px 40px;
  }
  .hero-banner {
    padding: 20px 16px;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .stats-ribbon {
    grid-template-columns: 1fr;
  }
  .exploration-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .info-card-grid {
    grid-template-columns: 1fr;
  }
  .hof-grid {
    grid-template-columns: 1fr;
  }
  .tile-box {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
  .key-btn {
    height: 42px;
    font-size: 0.85rem;
  }
}
