/* ============================================================
   Powerball Predictor - styles
   Carried over from the original Flask template's inline styles,
   split into a file so the static build can cache it.
   ============================================================ */

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0d0221, #1a0533 30%, #0f0c3b 60%, #0a1628);
  color: #e0d4f5;
  min-height: 100vh;
  padding: 20px;
}

.container { max-width: 1400px; margin: 0 auto; }

header {
  text-align: center;
  padding: 30px 20px;
  background: rgba(255, 255, 255, .03);
  border-radius: 20px;
  margin-bottom: 30px;
  border: 1px solid rgba(160, 120, 255, .15);
  backdrop-filter: blur(10px);
}
header h1 {
  font-size: 2.8em;
  font-weight: 800;
  background: linear-gradient(135deg, #c084fc, #818cf8, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}
header p { color: #a892d6; margin-top: 8px; font-size: 1.1em; }

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

.card {
  background: rgba(255, 255, 255, .04);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(160, 120, 255, .12);
  backdrop-filter: blur(8px);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(100, 60, 200, .2); }
.card h2 {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 16px;
  color: #b89cf0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h2 .icon { font-size: 1.3em; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; }
.stat-item {
  text-align: center;
  padding: 16px 8px;
  background: rgba(255, 255, 255, .04);
  border-radius: 12px;
  border: 1px solid rgba(160, 120, 255, .08);
}
.stat-item .value {
  font-size: 2em;
  font-weight: 700;
  background: linear-gradient(135deg, #c084fc, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item .label { font-size: .85em; color: #9b87c7; margin-top: 4px; }
.stat-item .value.small { font-size: 1em; }

.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1em;
  margin: 4px;
}
.ball-white {
  background: radial-gradient(circle at 35% 30%, #f0f0f0, #c0c0c0);
  color: #1a1a2e;
  box-shadow: 0 2px 8px rgba(255, 255, 255, .2);
}
.ball-red {
  background: radial-gradient(circle at 35% 30%, #ff7b7b, #d32f2f);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 50, 50, .4);
  width: 52px;
  height: 52px;
  font-size: 1.1em;
}

.number-list { display: flex; flex-wrap: wrap; gap: 6px; }

.predict-controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 20px; }
.predict-controls label { font-size: .95em; color: #b89cf0; }
.predict-controls select {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(160, 120, 255, .3);
  background: rgba(20, 10, 50, .8);
  color: #e0d4f5;
  font-size: .95em;
  cursor: pointer;
  outline: none;
}
.predict-controls select:focus { border-color: #818cf8; }

.btn-generate {
  padding: 10px 28px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  font-weight: 700;
  font-size: 1em;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn-generate:hover { transform: scale(1.04); box-shadow: 0 4px 20px rgba(124, 58, 237, .5); }
.btn-generate:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.prediction-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, .03);
  border-radius: 12px;
  border: 1px solid rgba(160, 120, 255, .1);
  min-height: 80px;
}
.prediction-result .label-pb { font-size: .9em; color: #f472b6; font-weight: 600; margin-left: 8px; }

.chart-container { position: relative; height: 300px; width: 100%; }
.chart-switch { display: flex; gap: 8px; margin-bottom: 12px; }
.chart-switch button {
  padding: 6px 16px;
  border: 1px solid rgba(160, 120, 255, .25);
  border-radius: 8px;
  background: transparent;
  color: #a892d6;
  cursor: pointer;
  font-size: .85em;
  transition: all .2s;
}
.chart-switch button.active { background: rgba(124, 58, 237, .3); border-color: #7c3aed; color: #c084fc; }
.chart-switch button:hover { background: rgba(124, 58, 237, .15); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9em; }
th { text-align: left; padding: 10px 12px; color: #9b87c7; border-bottom: 1px solid rgba(160, 120, 255, .15); }
td { padding: 10px 12px; border-bottom: 1px solid rgba(160, 120, 255, .06); }
tr:hover { background: rgba(160, 120, 255, .04); }

.balls-inline { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.balls-inline .ball { width: 32px; height: 32px; font-size: .8em; margin: 0; }
.balls-inline .ball-red { width: 36px; height: 36px; font-size: .85em; }

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(160, 120, 255, .2);
  border-top-color: #c084fc;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-row { text-align: center; padding: 40px; color: #9b87c7; }

.strategy-note {
  font-size: .85em;
  color: #9b87c7;
  margin-top: 14px;
  line-height: 1.55;
  border-left: 2px solid rgba(160, 120, 255, .25);
  padding-left: 12px;
}
.strategy-note strong { color: #b89cf0; }

footer {
  text-align: center;
  padding: 30px 20px 10px;
  color: #6b5b8a;
  font-size: .85em;
  border-top: 1px solid rgba(160, 120, 255, .08);
  margin-top: 40px;
}
footer strong { color: #9b87c7; }

.source-line { margin-top: 6px; }
.source-line a { color: #818cf8; }

@media (max-width: 1024px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  header h1 { font-size: 2em; }
  body { padding: 12px; }
  .card { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .card:hover, .btn-generate:hover { transform: none; }
}
