/* ===== CSS Variables & Theme ===== */
:root {
  --bg: #f0f2f5;
  --bg-card: #ffffff;
  --bg-card-inner: #f8f9fa;
  --text: #1a1a2e;
  --text-secondary: #6c757d;
  --primary: #4361ee;
  --primary-hover: #3a56d4;
  --secondary: #6c757d;
  --danger: #ef476f;
  --danger-hover: #d63d5e;
  --success: #06d6a0;
  --border: #dee2e6;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --ball-1: #fbc400;
  --ball-2: #69c8f2;
  --ball-3: #ff7272;
  --ball-4: #aaa;
  --ball-5: #b0d840;
  --tab-bg: #e9ecef;
  --tab-active: #4361ee;
  --input-bg: #ffffff;
  --input-border: #ced4da;
}

[data-theme="dark"] {
  --bg: #0f0f23;
  --bg-card: #1a1a35;
  --bg-card-inner: #252545;
  --text: #e8e8f0;
  --text-secondary: #8888aa;
  --primary: #5a7eff;
  --primary-hover: #4a6eef;
  --border: #2a2a4a;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --tab-bg: #1a1a35;
  --tab-active: #5a7eff;
  --input-bg: #252545;
  --input-border: #3a3a5a;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

/* ===== App Container ===== */
.app {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 12px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, #4361ee, #ef476f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: var(--shadow);
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--tab-bg);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.tab.active {
  background: var(--tab-active);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
}

.tab:hover:not(.active) {
  color: var(--text);
  background: rgba(67, 97, 238, 0.1);
}

/* ===== Tab Panels ===== */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.card-inner {
  background: var(--bg-card-inner);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 20px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-secondary {
  background: var(--bg-card-inner);
  color: var(--text);
  border: 1px solid var(--border);
  width: 100%;
  margin-top: 16px;
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-card-inner);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  width: 100%;
  margin-top: 16px;
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-large {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-icon {
  font-size: 1.2rem;
}

/* ===== Generate Controls ===== */
.generate-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}

.generate-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.generate-controls select {
  padding: 10px 14px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
}

/* ===== Lotto Balls ===== */
.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.ball::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 8px;
  width: 12px;
  height: 8px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.ball-1-10 { background: var(--ball-1); }
.ball-11-20 { background: var(--ball-2); }
.ball-21-30 { background: var(--ball-3); }
.ball-31-40 { background: var(--ball-4); }
.ball-41-45 { background: var(--ball-5); }

.ball.matched {
  animation: matchPulse 0.5s ease;
  box-shadow: 0 0 0 3px var(--success), inset 0 -3px 6px rgba(0, 0, 0, 0.15);
}

.ball.not-matched {
  opacity: 0.35;
}

@keyframes matchPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ===== Results ===== */
.results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-card-inner);
  border-radius: var(--radius-sm);
  animation: slideIn 0.3s ease;
}

.result-row .game-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 24px;
}

.result-row .balls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.result-row .save-single {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.result-row .save-single:hover {
  opacity: 1;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes ballDrop {
  0% { opacity: 0; transform: translateY(-20px) scale(0.5); }
  60% { transform: translateY(4px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ball-animate {
  animation: ballDrop 0.4s ease forwards;
  opacity: 0;
}

/* ===== Number Grid (Manual) ===== */
.number-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}

.grid-num {
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.grid-num:hover {
  border-color: var(--primary);
  transform: scale(1.08);
}

.grid-num.selected {
  color: #fff;
  border-color: transparent;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.grid-num.selected.ball-1-10 { background: var(--ball-1); }
.grid-num.selected.ball-11-20 { background: var(--ball-2); }
.grid-num.selected.ball-21-30 { background: var(--ball-3); }
.grid-num.selected.ball-31-40 { background: var(--ball-4); }
.grid-num.selected.ball-41-45 { background: var(--ball-5); }

.manual-selected {
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 52px;
  align-items: center;
  margin-bottom: 16px;
}

.manual-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ===== Saved List ===== */
.saved-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saved-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-card-inner);
  border-radius: var(--radius-sm);
}

.saved-item .balls {
  display: flex;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
}

.saved-item .saved-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.saved-item .delete-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.saved-item .delete-btn:hover {
  opacity: 1;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ===== Winning Input ===== */
.winning-input {
  margin-bottom: 20px;
}

.winning-input label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  margin-top: 12px;
}

.winning-numbers-row {
  display: flex;
  gap: 8px;
}

.winning-num {
  width: 100%;
  padding: 10px;
  border: 2px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  font-family: inherit;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}

.winning-num::-webkit-outer-spin-button,
.winning-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.winning-num:focus {
  outline: none;
  border-color: var(--primary);
}

.winning-num.bonus {
  max-width: 70px;
  border-color: var(--ball-3);
}

/* ===== Check Results ===== */
.check-result-item {
  padding: 14px;
  background: var(--bg-card-inner);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.check-result-item .balls {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.rank-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.rank-1 { background: #ffd700; color: #333; }
.rank-2 { background: #c0c0c0; color: #333; }
.rank-3 { background: #cd7f32; color: #fff; }
.rank-4 { background: var(--primary); color: #fff; }
.rank-5 { background: var(--success); color: #fff; }
.rank-none { background: var(--border); color: var(--text-secondary); }

.match-info {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-left: 8px;
}

/* ===== Stats Chart ===== */
.stats-chart {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.stat-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-bar-container {
  width: 100%;
  height: 80px;
  background: var(--bg-card-inner);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.stat-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
}

.stat-num {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-count {
  font-size: 0.6rem;
  color: var(--text-secondary);
}

/* ===== Recent History ===== */
.recent-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-item .balls {
  display: flex;
  gap: 4px;
}

.history-item .ball {
  width: 32px;
  height: 32px;
  font-size: 0.78rem;
}

.history-item .history-date {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-left: auto;
  white-space: nowrap;
}

/* ===== Contact Form ===== */
.form-group {
  margin-bottom: 16px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-full {
  width: 100%;
}

.contact-success {
  text-align: center;
  padding: 32px 16px;
}

.contact-success .success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.contact-success h3 {
  margin-bottom: 8px;
}

.contact-success p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ===== Latest Result Banner ===== */
.latest-result {
  margin-bottom: 16px;
  text-align: center;
  padding: 16px 20px;
}

.latest-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.latest-round {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.latest-date {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.latest-balls {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.latest-bonus {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ===== Share Buttons ===== */
.share-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.btn-share {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-twitter {
  background: #000;
  color: #fff;
  border-color: #000;
}

.btn-twitter:hover {
  opacity: 0.85;
}

.btn-copy:hover {
  background: var(--bg-card-inner);
}

/* ===== Excluded Info ===== */
.excluded-info {
  background: var(--bg-card-inner);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.excluded-info span:first-child {
  font-weight: 700;
  color: var(--danger);
}

/* ===== Winning History ===== */
.winning-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.winning-history-item {
  background: var(--bg-card-inner);
  border-radius: var(--radius-sm);
  padding: 12px;
}

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

.wh-round {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

.wh-date {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.wh-balls {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.wh-balls .ball {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}

.wh-bonus {
  color: var(--text-secondary);
  font-weight: 700;
  margin: 0 2px;
  font-size: 0.9rem;
}

.wh-prize {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.history-controls {
  display: flex;
  justify-content: flex-end;
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-card-inner);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item summary:hover {
  background: rgba(67, 97, 238, 0.05);
}

.faq-item p {
  padding: 0 16px 14px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.faq-item code {
  background: var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* ===== Disqus Comments ===== */
.disqus-section {
  margin-top: 24px;
}

.disqus-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

#disqus_thread {
  min-height: 200px;
}

/* ===== Info Cards (Guide Content) ===== */
.info-card {
  margin-top: 16px;
}

.info-card h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.info-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 12px;
  color: var(--text);
}

.info-card ul, .info-card ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.info-card li {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 4px;
}

.info-note {
  font-size: 0.82rem !important;
  color: var(--text-secondary) !important;
  font-style: italic;
}

/* ===== Guide Section ===== */
.guide-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.guide-section:first-of-type {
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
}

.guide-section h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.guide-section p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.guide-section ul, .guide-section ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.guide-section li {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 6px;
}

/* ===== Prize / Probability Tables ===== */
.prize-table, .probability-table {
  overflow-x: auto;
  margin: 12px 0;
}

.prize-table table, .probability-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.prize-table th, .probability-table th {
  background: var(--bg-card-inner);
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
}

.prize-table td, .probability-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

/* ===== Policy Pages ===== */
.policy-page {
  line-height: 1.8;
}

.policy-page h1 {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.policy-page h2 {
  font-size: 1.1rem;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--primary);
}

.policy-page p {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.policy-page ul, .policy-page ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.policy-page li {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.policy-date {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ===== About Page Features ===== */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  background: var(--bg-card-inner);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.feature-item h3 {
  margin-bottom: 6px;
}

.feature-item p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 24px 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-links span {
  color: var(--border);
}

.footer-disclaimer {
  font-size: 0.75rem;
  margin-top: 4px;
  color: var(--text-secondary);
  opacity: 0.8;
}

/* ===== Toast Notification ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform 0.3s ease;
  white-space: nowrap;
}

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

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .app { padding: 0 10px 24px; }
  .header { padding: 16px 0 8px; }
  .logo { font-size: 1.3rem; }
  .tab { padding: 8px 4px; font-size: 0.75rem; }
  .card { padding: 16px; }
  .ball { width: 38px; height: 38px; font-size: 0.88rem; }
  .number-grid { grid-template-columns: repeat(7, 1fr); gap: 5px; }
  .generate-controls { flex-direction: column; align-items: stretch; }
  .btn-large { width: 100%; }
  .winning-num { padding: 8px 4px; font-size: 1rem; }
  .stats-chart { grid-template-columns: repeat(5, 1fr); }
}
