/* ==========================================================================
   [행운의 로또 6/45 번호] - Modern Premium Design System
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #0a0e17;
  --bg-secondary: #121826;
  --bg-card: rgba(22, 30, 49, 0.75);
  --bg-card-hover: rgba(28, 38, 62, 0.9);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(245, 158, 11, 0.35);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.4);
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-red: #ef4444;

  /* Official-style 3D Spherical Ball Gradients */
  --ball-yellow: radial-gradient(circle at 35% 30%, #fff7a9 0%, #facc15 35%, #ca8a04 75%, #854d0e 100%);
  --ball-yellow-shadow: 0 8px 16px -2px rgba(234, 179, 8, 0.45), inset 0 -3px 5px rgba(0, 0, 0, 0.4);

  --ball-blue: radial-gradient(circle at 35% 30%, #bae6fd 0%, #38bdf8 35%, #0284c7 75%, #0369a1 100%);
  --ball-blue-shadow: 0 8px 16px -2px rgba(14, 165, 233, 0.45), inset 0 -3px 5px rgba(0, 0, 0, 0.4);

  --ball-red: radial-gradient(circle at 35% 30%, #fecaca 0%, #f87171 35%, #dc2626 75%, #991b1b 100%);
  --ball-red-shadow: 0 8px 16px -2px rgba(239, 68, 68, 0.45), inset 0 -3px 5px rgba(0, 0, 0, 0.4);

  --ball-gray: radial-gradient(circle at 35% 30%, #f1f5f9 0%, #94a3b8 35%, #475569 75%, #1e293b 100%);
  --ball-gray-shadow: 0 8px 16px -2px rgba(100, 116, 139, 0.45), inset 0 -3px 5px rgba(0, 0, 0, 0.4);

  --ball-green: radial-gradient(circle at 35% 30%, #bbf7d0 0%, #4ade80 35%, #16a34a 75%, #14532d 100%);
  --ball-green-shadow: 0 8px 16px -2px rgba(34, 197, 94, 0.45), inset 0 -3px 5px rgba(0, 0, 0, 0.4);

  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --glass-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.45);

  /* Typography */
  --font-family: 'Outfit', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-smooth: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(245, 158, 11, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Canvas Confetti */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Container */
.app-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}

/* ==========================================================================
   Site Header
   ========================================================================== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
  font-size: 1.6rem;
  flex-shrink: 0;
}

.brand-info h1 {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(to right, #ffffff, #fef08a, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.round-info-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde047;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #f59e0b;
  border-radius: 50%;
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Hero Stage: 5 Draws Section
   ========================================================================== */
.hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--glass-shadow);
  margin-bottom: 2rem;
  position: relative;
}

.stage-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.85rem;
}

.stage-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.35rem;
}

.stage-main-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.status-indicator {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  transition: var(--transition-smooth);
}

.status-indicator.drawing {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fde047;
  animation: pulseGlow 1.2s infinite;
}

/* Stage Actions Buttons */
.stage-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.btn-primary {
  flex: 2;
  min-width: 260px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
  transition: var(--transition-smooth);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.5);
  filter: brightness(1.1);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  flex: 1;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================================
   5 Draw Cards List (Games A ~ E)
   ========================================================================== */
.draw-games-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.draw-game-card {
  background: rgba(14, 20, 32, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.draw-game-card:hover {
  background: rgba(20, 29, 46, 0.85);
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Highlight for Game 1 (A) */
.draw-game-card.game-main {
  background: rgba(20, 28, 48, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.28);
  box-shadow: inset 0 0 16px rgba(245, 158, 11, 0.05);
}

.game-left-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 140px;
}

.badge-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.badge-a { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
.badge-b { background: linear-gradient(135deg, #0284c7, #38bdf8); box-shadow: 0 0 10px rgba(56, 189, 248, 0.5); }
.badge-c { background: linear-gradient(135deg, #059669, #34d399); box-shadow: 0 0 10px rgba(52, 211, 153, 0.5); }
.badge-d { background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 0 10px rgba(168, 85, 247, 0.5); }
.badge-e { background: linear-gradient(135deg, #e11d48, #fb7185); box-shadow: 0 0 10px rgba(251, 113, 133, 0.5); }

.game-title-text {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

/* Balls Row Container */
.game-balls-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
}

/* Ball Component (3D Spherical) */
.ball-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.ball-unit-lbl {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.ball-unit-lbl.bonus-lbl {
  color: var(--accent-gold);
  font-weight: 700;
}

.lotto-ball {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  user-select: none;
  transition: transform 0.2s ease;
  position: relative;
}

.lotto-ball.bonus-ball {
  border: 2px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.lotto-ball.rolling {
  animation: ballRoll 0.12s infinite alternate ease-in-out;
  filter: blur(0.4px);
}

@keyframes ballRoll {
  0% { transform: translateY(-2px) scale(0.96) rotate(-6deg); }
  100% { transform: translateY(2px) scale(1.03) rotate(6deg); }
}

.lotto-ball.reveal {
  animation: ballPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes ballPopIn {
  0% { opacity: 0; transform: scale(0.4) rotate(-20deg); }
  70% { transform: scale(1.15) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Colors by Range */
.ball-range-1 {
  background: var(--ball-yellow);
  box-shadow: var(--ball-yellow-shadow);
  color: #1a1500;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.ball-range-2 {
  background: var(--ball-blue);
  box-shadow: var(--ball-blue-shadow);
}

.ball-range-3 {
  background: var(--ball-red);
  box-shadow: var(--ball-red-shadow);
}

.ball-range-4 {
  background: var(--ball-gray);
  box-shadow: var(--ball-gray-shadow);
}

.ball-range-5 {
  background: var(--ball-green);
  box-shadow: var(--ball-green-shadow);
}

.ball-empty {
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.ball-plus-sign {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-dim);
  margin: 0 0.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Right Meta Info & Copy Button */
.game-right-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 170px;
  justify-content: flex-end;
}

.game-stat-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.game-stat-tag strong {
  color: #fff;
  font-weight: 700;
}

.sm-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.sm-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Summary Stats Bar */
.summary-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-pill {
  background: rgba(10, 14, 23, 0.4);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.stat-lbl {
  color: var(--text-muted);
}

.stat-val {
  color: #fff;
  font-weight: 700;
}

.stat-val.highlight {
  color: var(--accent-gold);
}

/* ==========================================================================
   2-Column Section (Filters & History)
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--glass-shadow);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}

/* Filter Mode Tabs */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  background: rgba(10, 14, 23, 0.5);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.filter-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-tab-btn.active {
  background: var(--bg-card-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.filter-tab-btn[data-mode="include"].active {
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.filter-tab-btn[data-mode="exclude"].active {
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Number Picker 1~45 Grid */
.option-group {
  margin-bottom: 0.9rem;
}

.option-title {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.35rem;
}

.grid-num-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-num-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.grid-num-btn.selected-include {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border-color: #34d399;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.grid-num-btn.selected-exclude {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  border-color: #f87171;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  text-decoration: line-through;
}

/* Filter Tag Row */
.filter-status-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: rgba(10, 14, 23, 0.4);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
}

.filter-tag-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tag-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 700;
  min-width: 80px;
}

.filter-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.filter-tag.inc {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.filter-tag.exc {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.tag-remove {
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.7;
}

.tag-remove:hover {
  opacity: 1;
}

/* Toggle Switch */
.toggle-row {
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.switch-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.25s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-emerald);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* ==========================================================================
   History Section
   ========================================================================== */
.history-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-right: 0.25rem;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.history-item {
  background: rgba(14, 20, 32, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.history-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: monospace;
}

.history-badge-5 {
  font-size: 0.68rem;
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-weight: 700;
}

.history-mini-balls {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.history-mini-ball {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ==========================================================================
   Color Guide Card & Footer
   ========================================================================== */
.color-guide-card {
  margin-bottom: 2rem;
}

.color-guide-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.color-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
}

.color-guide-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.yellow-dot { background: #facc15; box-shadow: 0 0 6px #facc15; }
.blue-dot { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }
.red-dot { background: #f87171; box-shadow: 0 0 6px #f87171; }
.gray-dot { background: #94a3b8; box-shadow: 0 0 6px #94a3b8; }
.green-dot { background: #4ade80; box-shadow: 0 0 6px #4ade80; }

.site-footer {
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-disclaimer {
  font-size: 0.75rem;
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* ==========================================================================
   Toast Notification Popup
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 24, 38, 0.95);
  border: 1px solid var(--accent-gold);
  color: #ffffff;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.3);
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 99999;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .draw-game-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .game-left-info {
    justify-content: flex-start;
  }

  .game-right-actions {
    justify-content: space-between;
    width: 100%;
  }

  .number-grid {
    grid-template-columns: repeat(9, 1fr);
  }
}

@media (max-width: 600px) {
  .app-container {
    padding: 1.25rem 0.85rem 3rem;
  }

  .brand-info h1 {
    font-size: 1.3rem;
  }

  .lotto-ball {
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
  }

  .game-balls-wrap {
    gap: 0.4rem;
  }

  .stage-actions {
    flex-direction: column;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
  }

  .number-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
