.lotto-panel {
  max-width: 1080px;
  margin: 0 auto;
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Center Actions (Generate Button Area) */
.center-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

/* Recent Winning Numbers */
.recent-numbers {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px 20px;
  margin: 0 16px 24px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.recent-numbers::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #ffd700, #ff8c00);
}

.recent-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.5px;
}

.recent-header i {
  color: #ffd700;
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
}

.recent-date {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
  font-weight: 500;
  background: var(--background);
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.recent-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  min-height: 60px;
}

.recent-empty {
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
  padding: 20px 0;
  font-style: italic;
}

.recent-prizes {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.recent-prize-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--text);
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
}

.recent-prize-item:last-child {
  border-bottom: none;
}

.recent-prize-label {
  font-weight: 700;
  color: var(--primary);
  min-width: 60px;
  text-align: left;
}

.recent-prize-values {
  color: var(--text);
  text-align: right;
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

.bonus-separator {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--border);
  margin: 0 8px;
}

.ball-separator {
  width: 12px;
  height: 2px;
  background: var(--border);
  border-radius: 999px;
  display: inline-block;
  margin: 0 6px;
  opacity: 0.7;
}

.recent-group-label,
.result-group-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin: 6px 8px 6px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.recent-group-label {
  margin-right: 10px;
}

/* Unified Ticket Number Style (El Gordo) */
.lotto-ticket {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  background: linear-gradient(to bottom, var(--background), var(--surface));
  padding: 15px 30px;
  border-radius: 12px;
  border: 2px dashed var(--primary);
  letter-spacing: 0.2em;
  text-align: center;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
  display: inline-block;
  position: relative;
  transition: all 0.3s ease;
}

.lotto-ticket:hover {
  transform: scale(1.02);
  border-color: #ffd700;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.lotto-ticket::before,
.lotto-ticket::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  background-color: var(--surface); /* Matches parent bg usually */
  border-radius: 50%;
  transform: translateY(-50%);
  z-index: 1;
  box-shadow: inset -1px 0 2px rgba(0,0,0,0.1);
}

.lotto-ticket::before {
  left: -10px;
  border-right: 2px dashed var(--primary);
}

.lotto-ticket::after {
  right: -10px;
  background-color: var(--surface);
  border-left: 2px dashed var(--primary);
  box-shadow: inset 1px 0 2px rgba(0,0,0,0.1);
}

.action-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: center;
}

/* Collapsible Options Panel - from ladder.css */
.options-collapsible {
  position: relative;
  z-index: 10;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.options-collapsible:not(.collapsed) {
  border: none;
  box-shadow: none;
  overflow: visible;
}

.options-collapsible.collapsed {
  background: transparent;
  overflow: visible;
}

.options-toggle {
  width: 100%;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  line-height: 1;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  z-index: 20;
}

.options-collapsible.collapsed .options-toggle {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
  margin-bottom: 0;
}

.options-collapsible.collapsed .options-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px -5px rgba(99, 102, 241, 0.5);
  filter: brightness(1.1);
}

.options-collapsible:not(.collapsed) .options-toggle {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 24px;
}

.options-collapsible:not(.collapsed) .options-toggle:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.options-toggle i {
  font-size: 1.1em;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}

.options-collapsible.collapsed .options-toggle i {
  transform: rotate(180deg);
}

.options-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  transform-origin: top center;
  transition: 
    max-height 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.options-content:not(.collapsed) {
  max-height: 1500px;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.options-content.collapsed {
  max-height: 0;
  opacity: 0;
}

.lotto-options-wrapper {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Field Styles */
.field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-label {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Lotto Type Options - New Card Design with Logo and Flag */
.lotto-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 16px 12px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.option-card:has(input:checked) {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(106, 167, 255, 0.15), rgba(122, 245, 198, 0.15));
  box-shadow: 0 8px 20px rgba(106, 167, 255, 0.3);
  transform: translateY(-3px);
}

/* Lottery Logo */
.option-logo {
  width: 100%;
  max-width: 120px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}

/* Text Logo for lotteries without images */
.option-logo-text {
  width: 100%;
  max-width: 120px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  padding: 8px 12px;
  line-height: 1.2;
  word-break: break-word;
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
  color: white;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    0 4px 12px rgba(106, 167, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.option-card:hover .option-logo-text {
  transform: scale(1.05);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 6px 16px rgba(106, 167, 255, 0.4);
}

.option-card:has(input:checked) .option-logo-text {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 8px 20px rgba(106, 167, 255, 0.5);
}

/* Info Container (Flag + Text) */
.option-info {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

/* Country Flags - Real Images */
.option-flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.option-text {
  font-size: 0.85rem;
  line-height: 1.2;
  font-weight: 600;
}

/* Count Controls - Button Style */
.count-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.count-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-2);
  padding: 6px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

.count-value {
  font-size: 1.25rem;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
  color: var(--text);
}

.count-btn {
  all: unset;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}

.count-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.count-btn:active {
  transform: scale(0.95);
}

.count-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Result Card */
.result-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.result-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.result-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.result-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

button:not(.primary-btn):not(.pill-btn):not(.segmented__btn):not(.category-chip):not(.tool-btn):not(.mode-btn):not(.ghost-btn):not(.search-clear-btn):not(.overlay-action-btn).result-item {
  all: unset;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

button:not(.primary-btn):not(.pill-btn):not(.segmented__btn):not(.category-chip):not(.tool-btn):not(.mode-btn):not(.ghost-btn):not(.search-clear-btn):not(.overlay-action-btn).result-item:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 24px rgba(106, 167, 255, 0.25);
}

button:not(.primary-btn):not(.pill-btn):not(.segmented__btn):not(.category-chip):not(.tool-btn):not(.mode-btn):not(.ghost-btn):not(.search-clear-btn):not(.overlay-action-btn).result-item:active {
  transform: translateY(-2px);
}

.result-set {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  text-align: center;
}

.result-balls-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.result-balls {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

/* Enhanced Ball Designs per Lottery */
.ball {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  position: relative;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.ball::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 20%;
  width: 30%;
  height: 30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.result-item:hover .ball {
  transform: rotate(360deg);
}

/* Korea Lotto 645 - Vibrant Colors by Number Range */
.ball[data-game="kr645"].ball-yellow {
  background: linear-gradient(135deg, #ffd93d 0%, #ffb020 100%);
  color: #1a1a1a;
  border: 1px solid #e6a800;
}

.ball[data-game="kr645"].ball-blue {
  background: linear-gradient(135deg, #6eb5ff 0%, #4a90e2 100%);
  color: #ffffff;
  border: 1px solid #3a7bc8;
}

.ball[data-game="kr645"].ball-red {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: #ffffff;
  border: 1px solid #d84a47;
}

.ball[data-game="kr645"].ball-gray {
  background: linear-gradient(135deg, #b8bec8 0%, #8b96a5 100%);
  color: #1a1a1a;
  border: 1px solid #6d7b8d;
}

.ball[data-game="kr645"].ball-green {
  background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
  color: #ffffff;
  border: 1px solid #2f9e44;
}

/* Japan Lotto - White/Cream balls with red numbers */
.ball[data-game^="jp-"] {
  background: linear-gradient(135deg, #fff9f0 0%, #ffe8cc 100%);
  color: #c41e3a;
  border: 2px solid #e0d0b8;
  font-weight: 800;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(200, 180, 140, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.15);
}

/* US Powerball - White balls with red Powerball */
.ball[data-game="us-powerball"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="us-powerball"][data-bonus="true"] {
  background: linear-gradient(135deg, #e63946 0%, #d62828 100%);
  color: #ffffff;
  border: 2px solid #a4161a;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(230, 57, 70, 0.6),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-powerball 2s ease-in-out infinite;
}

@keyframes pulse-powerball {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 20px rgba(230, 57, 70, 0.6),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.5),
      0 0 30px rgba(230, 57, 70, 0.9),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* US Mega Millions - White balls with gold Mega Ball */
.ball[data-game="us-mega"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="us-mega"][data-bonus="true"] {
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  color: #1a1a1a;
  border: 2px solid #d4a017;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 215, 0, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-mega 2s ease-in-out infinite;
}

@keyframes pulse-mega {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(255, 215, 0, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.6),
      0 0 30px rgba(255, 215, 0, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* US NY Lotto - White/Blue themed */
.ball[data-game="us-ny-lotto"] {
  background: linear-gradient(135deg, #ffffff 0%, #e8f4f8 100%);
  color: #003d82;
  border: 2px solid #b0d4e3;
  font-weight: 800;
}

/* EuroJackpot - White balls with gold Euro numbers */
.ball[data-game="eu-eurojackpot"] {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  color: #1a1a1a;
  border: 2px solid #cccccc;
  font-weight: 800;
}

.ball[data-game="eu-eurojackpot"][data-bonus="true"] {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: #1a1a1a;
  border: 2px solid #f57c00;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 193, 7, 0.6),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-euro 2s ease-in-out infinite;
}

@keyframes pulse-euro {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(255, 193, 7, 0.6),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.6),
      0 0 30px rgba(255, 193, 7, 0.9),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* EuroMillions - White balls with gold Lucky Stars */
.ball[data-game="eu-euromillions"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="eu-euromillions"][data-bonus="true"] {
  background: linear-gradient(135deg, #ffe135 0%, #ffc107 100%);
  color: #1a1a1a;
  border: 2px solid #f9a825;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 225, 53, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  position: relative;
}

.ball[data-game="eu-euromillions"][data-bonus="true"]::after {
  content: '★';
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 0.6em;
  color: #ffc107;
  text-shadow: 0 0 4px rgba(255, 193, 7, 0.8);
}

/* Fallback for generic special balls */
.ball.special:not([data-game]) {
  background: linear-gradient(135deg, #9b59b6 0%, #e67e22 100%);
  color: #ffffff;
  border: 2px solid #f39c12;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(230, 126, 34, 0.6),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-special 2s ease-in-out infinite;
}

@keyframes pulse-special {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      inset 0 -2px 4px rgba(0, 0, 0, 0.3),
      0 0 20px rgba(230, 126, 34, 0.6),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.5),
      inset 0 -2px 4px rgba(0, 0, 0, 0.2),
      0 0 30px rgba(230, 126, 34, 0.9),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Spain La Primitiva - White balls with red Reintegro */
.ball[data-game="es-primitiva"] {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="es-primitiva"][data-bonus="true"] {
  background: linear-gradient(135deg, #c1272d 0%, #8b0000 100%);
  color: #ffffff;
  border: 2px solid #8b0000;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(193, 39, 45, 0.6),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-spain 2s ease-in-out infinite;
}

@keyframes pulse-spain {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(193, 39, 45, 0.6),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(193, 39, 45, 0.9),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Italy SuperEnalotto - White balls with blue Jolly */
.ball[data-game="it-superenalotto"] {
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  color: #1a1a1a;
  border: 2px solid #d8d8d8;
  font-weight: 800;
}

.ball[data-game="it-superenalotto"][data-bonus="true"] {
  background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
  color: #ffffff;
  border: 2px solid #003d7a;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(0, 102, 204, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-italy 2s ease-in-out infinite;
}

@keyframes pulse-italy {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(0, 102, 204, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(0, 102, 204, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Australia Powerball - White balls with red Powerball */
.ball[data-game="au-powerball"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="au-powerball"][data-bonus="true"] {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: #ffffff;
  border: 2px solid #8e0000;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(211, 47, 47, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-au 2s ease-in-out infinite;
}

@keyframes pulse-au {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(211, 47, 47, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(211, 47, 47, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Germany Lotto 6aus49 - White balls with red Superzahl */
.ball[data-game="de-lotto"] {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="de-lotto"][data-bonus="true"] {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #ffffff;
  border: 2px solid #990000;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(255, 0, 0, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-germany 2s ease-in-out infinite;
}

@keyframes pulse-germany {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(255, 0, 0, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(255, 0, 0, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* US Lotto America - White balls with red Star Ball */
.ball[data-game="us-lotto-america"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="us-lotto-america"][data-bonus="true"] {
  background: linear-gradient(135deg, #dc143c 0%, #b22222 100%);
  color: #ffffff;
  border: 2px solid #8b0000;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(220, 20, 60, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  position: relative;
}

.ball[data-game="us-lotto-america"][data-bonus="true"]::after {
  content: '★';
  position: absolute;
  top: -3px;
  right: -3px;
  font-size: 0.65em;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(220, 20, 60, 0.9);
}

/* US 2by2 - Red and White balls (4 total, no bonus) */
.ball[data-game="us-2by2"][data-2by2="red"] {
  background: linear-gradient(135deg, #e63946 0%, #d62828 100%);
  color: #ffffff;
  border: 2px solid #a4161a;
  font-weight: 800;
}

.ball[data-game="us-2by2"][data-2by2="white"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

/* UK Lotto - White balls with purple bonus ball */
.ball[data-game="uk-lotto"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="uk-lotto"][data-bonus="true"] {
  background: linear-gradient(135deg, #7e2f8e 0%, #5c1e6a 100%);
  color: #ffffff;
  border: 2px solid #3d1250;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(126, 47, 142, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-uk 2s ease-in-out infinite;
}

@keyframes pulse-uk {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(126, 47, 142, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(126, 47, 142, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* France Loto - Red balls with blue chance number */
.ball[data-game="fr-loto"] {
  background: linear-gradient(135deg, #e63946 0%, #d62828 100%);
  color: #ffffff;
  border: 2px solid #a4161a;
  font-weight: 800;
}

.ball[data-game="fr-loto"][data-bonus="true"] {
  background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
  color: #ffffff;
  border: 2px solid #003366;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(0, 102, 204, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-france 2s ease-in-out infinite;
}

@keyframes pulse-france {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(0, 102, 204, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(0, 102, 204, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Australia Set for Life - Teal balls with orange bonus */
.ball[data-game="au-setforlife"] {
  background: linear-gradient(135deg, #00a896 0%, #028090 100%);
  color: #ffffff;
  border: 2px solid #05668d;
  font-weight: 800;
}

.ball[data-game="au-setforlife"][data-bonus="true"] {
  background: linear-gradient(135deg, #ff6f00 0%, #e65100 100%);
  color: #ffffff;
  border: 2px solid #bf360c;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(255, 111, 0, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-setforlife 2s ease-in-out infinite;
}

@keyframes pulse-setforlife {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(255, 111, 0, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(255, 111, 0, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Brazil Mega-Sena - Green and yellow gradient (Brazil colors) */
.ball[data-game="br-megasena"] {
  background: linear-gradient(135deg, #009739 0%, #007a2e 100%);
  color: #ffffff;
  border: 2px solid #ffd700;
  font-weight: 800;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 15px rgba(255, 215, 0, 0.5),
    0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Australia Oz Lotto - White balls with orange/red bonus (Supplementary) */
.ball[data-game="au-ozlotto"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="au-ozlotto"][data-bonus="true"] {
  background: linear-gradient(135deg, #ff6f00 0%, #ff5722 100%);
  color: #ffffff;
  border: 2px solid #e64a19;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(255, 111, 0, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-ozlotto 2s ease-in-out infinite;
}

@keyframes pulse-ozlotto {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(255, 111, 0, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(255, 111, 0, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Canada Lotto 6/49 - Red and white (Canada colors) */
.ball[data-game="ca-lotto649"] {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #ffffff;
  border: 2px solid #990000;
  font-weight: 800;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Canada Lotto Max - Blue and white */
.ball[data-game="ca-lottomax"] {
  background: linear-gradient(135deg, #0051a5 0%, #003d7a 100%);
  color: #ffffff;
  border: 2px solid #002855;
  font-weight: 800;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Europe EuroDreams - Purple balls with gold dream number */
.ball[data-game="eu-eurodreams"] {
  background: linear-gradient(135deg, #7e2f8e 0%, #5c1e6a 100%);
  color: #ffffff;
  border: 2px solid #3d1250;
  font-weight: 800;
}

.ball[data-game="eu-eurodreams"][data-bonus="true"] {
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  color: #1a1a1a;
  border: 2px solid #d4a017;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 215, 0, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-eurodreams 2s ease-in-out infinite;
}

@keyframes pulse-eurodreams {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(255, 215, 0, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.6),
      0 0 30px rgba(255, 215, 0, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Hong Kong Mark Six - Red and yellow (Hong Kong theme) */
.ball[data-game="hk-marksix"] {
  background: linear-gradient(135deg, #e63946 0%, #d62828 100%);
  color: #ffffff;
  border: 2px solid #a4161a;
  font-weight: 800;
}

.ball[data-game="hk-marksix"][data-bonus="true"] {
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  color: #1a1a1a;
  border: 2px solid #d4a017;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 215, 0, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-marksix 2s ease-in-out infinite;
}

@keyframes pulse-marksix {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(255, 215, 0, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.6),
      0 0 30px rgba(255, 215, 0, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* New Zealand Lotto - White balls with blue bonus and red powerball */
.ball[data-game="nz-lotto"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="nz-lotto"][data-bonus="true"] {
  background: linear-gradient(135deg, #0051a5 0%, #003d7a 100%);
  color: #ffffff;
  border: 2px solid #002855;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(0, 81, 165, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-nzbonus 2s ease-in-out infinite;
}

@keyframes pulse-nzbonus {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(0, 81, 165, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(0, 81, 165, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* South Africa Powerball - White balls with red powerball */
.ball[data-game="za-powerball"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="za-powerball"][data-bonus="true"] {
  background: linear-gradient(135deg, #e63946 0%, #d62828 100%);
  color: #ffffff;
  border: 2px solid #a4161a;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(230, 57, 70, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-za 2s ease-in-out infinite;
}

@keyframes pulse-za {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 20px rgba(230, 57, 70, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.5),
      0 0 30px rgba(230, 57, 70, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* UK Thunderball - White balls with dark blue thunderball */
.ball[data-game="uk-thunderball"] {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: #1a1a1a;
  border: 2px solid #d0d0d0;
  font-weight: 800;
}

.ball[data-game="uk-thunderball"][data-bonus="true"] {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  border: 2px solid #1e293b;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(30, 58, 138, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-thunderball 2s ease-in-out infinite;
  position: relative;
}

.ball[data-game="uk-thunderball"][data-bonus="true"]::after {
  content: '⚡';
  position: absolute;
  top: -3px;
  right: -3px;
  font-size: 0.7em;
  color: #fbbf24;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.9);
}

@keyframes pulse-thunderball {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(30, 58, 138, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(30, 58, 138, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* US Cash4Life - Green balls with gold cash ball */
.ball[data-game="us-cash4life"] {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 2px solid #047857;
  font-weight: 800;
}

.ball[data-game="us-cash4life"][data-bonus="true"] {
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  color: #1a1a1a;
  border: 2px solid #d4a017;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 215, 0, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-cash4life 2s ease-in-out infinite;
  position: relative;
}

.ball[data-game="us-cash4life"][data-bonus="true"]::after {
  content: '$';
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 0.6em;
  color: #047857;
  font-weight: 900;
  text-shadow: 0 0 4px rgba(16, 185, 129, 0.8);
}

@keyframes pulse-cash4life {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(255, 215, 0, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.6),
      0 0 30px rgba(255, 215, 0, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* US Lucky for Life - Yellow balls with green lucky ball */
.ball[data-game="us-luckyforlife"] {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1a1a1a;
  border: 2px solid #d97706;
  font-weight: 800;
}

.ball[data-game="us-luckyforlife"][data-bonus="true"] {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 2px solid #047857;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(16, 185, 129, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.3);
  animation: pulse-luckyforlife 2s ease-in-out infinite;
  position: relative;
}

.ball[data-game="us-luckyforlife"][data-bonus="true"]::after {
  content: '🍀';
  position: absolute;
  top: -3px;
  right: -3px;
  font-size: 0.6em;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.8));
}

@keyframes pulse-luckyforlife {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(16, 185, 129, 0.7),
      0 6px 16px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(255, 255, 255, 0.4),
      0 0 30px rgba(16, 185, 129, 1),
      0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .lotto-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .options-content:not(.collapsed) {
    max-height: unset;
  }
  
  .result-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .ball {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  /* 모바일 추천 번호 카드 오버플로우 방지 */
  .result-item {
    padding: 14px;
  }

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

  /* 모바일 복권 카테고리 텍스트 줄바꿈 방지 */
  .option-card {
    padding: 12px 8px;
    font-size: 0.85rem;
  }

  .option-logo,
  .option-logo-text {
    height: 50px;
    max-width: 100px;
  }
}

@media (max-width: 480px) {
  .lotto-options {
    grid-template-columns: 1fr;
  }
  
  .option-card {
    padding: 12px;
  }
}
