/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;700&display=swap');

:root {
  --blue:    #185FA5;
  --blue-lt: #E6F1FB;
  --red:     #A32D2D;
  --red-lt:  #FCEBEB;
  --green:   #3B6D11;
  --green-lt:#EAF3DE;
  --gray:    #5F5E5A;
  --gray-lt: #F1EFE8;
  --text:    #2C2C2A;
  --muted:   #888780;
  --border:  rgba(0,0,0,0.12);
  --radius:  10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Heebo', sans-serif;
  direction: rtl;
  background: #f5f4f0;
  color: var(--text);
  line-height: 1.6;
}

/* Layout */
.wrapper  { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
header    { background: var(--blue); color: #fff; padding: 1rem 0; margin-bottom: 1.5rem; }
header h1 { font-size: 1.5rem; font-weight: 500; }
header p  { font-size: 0.85rem; opacity: 0.75; }
.grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3   { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
@media(max-width:640px) { .grid-2,.grid-3 { grid-template-columns: 1fr; } }

/* Cards */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 0.5px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid var(--border);
  color: var(--text);
}

/* Balls */
.ball {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 15px; font-weight: 500; color: #fff;
  flex-shrink: 0;
}
.ball.regular { background: var(--blue); }
.ball.strong  { background: var(--red); }
.ball.hot     { background: #993C1D; }
.ball.cold    { background: var(--green); }
.ball.sm { width: 32px; height: 32px; font-size: 13px; }
.ball.lg { width: 52px; height: 52px; font-size: 18px; }

.balls-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Draw rows */
.draw-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 0.5px solid var(--border);
  flex-wrap: wrap;
}
.draw-item:last-child { border-bottom: none; }
.draw-meta { font-size: 12px; color: var(--muted); min-width: 100px; }

/* Stats bar */
.stat-bar {
  display: flex; gap: 1rem; flex-wrap: wrap;
  background: var(--gray-lt); border-radius: var(--radius);
  padding: 0.75rem 1rem; margin-bottom: 1rem;
}
.stat-item { text-align: center; }
.stat-val  { font-size: 1.4rem; font-weight: 700; color: var(--blue); }
.stat-lbl  { font-size: 11px; color: var(--muted); }

/* Frequency grid */
.freq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 5px;
}
.freq-cell {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 4px; border-radius: 8px;
  background: var(--gray-lt); cursor: default;
  transition: transform 0.1s;
}
.freq-cell:hover { transform: scale(1.05); }
.freq-num  { font-size: 13px; font-weight: 500; }
.freq-bar  { width: 100%; height: 5px; border-radius: 3px; background: #ddd; margin: 4px 0; }
.freq-fill { height: 100%; border-radius: 3px; background: var(--blue); }
.freq-cnt  { font-size: 10px; color: var(--muted); }

/* Predict section */
.predict-result {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; padding: 1.5rem 0;
}
.predict-ball { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.predict-pct  { font-size: 11px; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px;
  font-size: 14px; font-family: 'Heebo', sans-serif;
  cursor: pointer; border: 0.5px solid var(--border);
  transition: all 0.15s;
}
.btn-primary { background: var(--blue); color: #fff; border-color: transparent; }
.btn-primary:hover { opacity: 0.88; }
.btn-outline { background: #fff; color: var(--text); }
.btn-outline:hover { background: var(--gray-lt); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

/* Method tabs */
.method-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1rem; }
.method-tab {
  padding: 6px 14px; border-radius: 20px;
  border: 0.5px solid var(--border); background: #fff;
  font-size: 13px; cursor: pointer; font-family: 'Heebo', sans-serif;
  color: var(--muted); transition: all 0.15s;
}
.method-tab.active {
  background: var(--blue-lt); color: var(--blue);
  border-color: var(--blue); font-weight: 500;
}

/* Alerts */
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 0.75rem; }
.alert-info    { background: var(--blue-lt); color: var(--blue); }
.alert-warning { background: #FAEEDA; color: #854F0B; }
.alert-success { background: var(--green-lt); color: var(--green); }
.alert-error   { background: var(--red-lt); color: var(--red); }

/* Spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 1rem; }
.page-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; border: 0.5px solid var(--border);
  background: #fff; cursor: pointer; font-size: 13px;
  font-family: 'Heebo', sans-serif;
}
.page-btn.active { background: var(--blue); color: #fff; border-color: transparent; }
.page-btn:hover:not(.active) { background: var(--gray-lt); }

/* Disclaimer */
.disclaimer {
  text-align: center; font-size: 12px; color: var(--muted);
  padding: 12px; border-top: 0.5px solid var(--border);
  margin-top: 1rem; line-height: 1.5;
}

/* Nav tabs */
.nav-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; gap: 0; }
.nav-tab {
  padding: 10px 20px; font-size: 14px; cursor: pointer;
  border: none; background: none; font-family: 'Heebo', sans-serif;
  color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all 0.15s;
}
.nav-tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 500; }
.nav-tab:hover:not(.active) { color: var(--text); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
