@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: #0f172a;
  overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1f2937; border-radius: 3px; }
::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* --- Inputs --- */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: none; }
*:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }

/* --- Transitions --- */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 200ms; }

/* --- Lottery Balls --- */
.lottery-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #f3f4f6;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  box-shadow: inset -2px -2px 6px rgba(0,0,0,0.2), 2px 2px 5px rgba(0,0,0,0.3);
  text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
}

.special-ball { background: #ef4444; color: white; text-shadow: none; }
.cash-ball { background: #22c55e; color: white; text-shadow: none; }
.mega-ball { background: #eab308; color: #000; }
.hot-number { background: #f87171; color: white; text-shadow: none; }
.cold-number { background: #60a5fa; color: white; text-shadow: none; }

/* --- Ads Containers (Mobile Safe) --- */
.ad-container {
  display: block;
  width: 100%;
  min-height: 100px;
  background-color: #1f2937;
  border: 1px dashed #374151;
  border-radius: 8px;
  text-align: center;
  overflow: hidden;
  margin-bottom: 20px;
  padding-top: 10px;
}

.ad-container.in-feed {
  margin: 20px 0;
  padding: 10px 0;
  border: none;
  background: transparent;
}

/* --- UI Components --- */
.pair-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(31, 41, 55, 0.8);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  color: #d1d5db;
  border: 1px solid #374151;
}
.pair-box .lottery-ball { width: 24px; height: 24px; font-size: 0.75rem; }

/* --- Tabs --- */
.lottery-tab.active {
  color: white;
  background: rgba(255,255,255,0.05);
  border-radius: 8px 8px 0 0;
}
.lottery-tab[data-lottery="powerball"].active { border-bottom-color: #ef4444; }
.lottery-tab[data-lottery="cash4life"].active { border-bottom-color: #22c55e; }
.lottery-tab[data-lottery="megamillions"].active { border-bottom-color: #eab308; }

/* --- Generated Results --- */
.generated-combination {
  background: #1f2937;
  border-left: 4px solid #3b82f6;
  padding: 1rem;
  border-radius: 0.5rem;
  animation: fadeIn 0.4s ease-out;
}

/* --- History List Item --- */
.history-item {
  background-color: #1f2937;
  border: 1px solid #374151;
  transition: background-color 0.2s;
}
.history-item:hover { background-color: #374151; }

/* --- Delete Button --- */
.delete-btn {
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}
.delete-btn:hover { opacity: 1; transform: scale(1.1); color: #ef4444; }

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn { animation: fadeIn 0.4s ease-out forwards; }

.loading-spinner {
  border: 3px solid rgba(255,255,255,0.1);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Mobile Fixes --- */
@media (max-width: 640px) {
  .lottery-ball { width: 32px; height: 32px; font-size: 0.9rem; }
  .lottery-tab { flex: 1; padding: 10px 4px; font-size: 0.8rem; }
}