/*
Theme Name: Teer Result Pro
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A clean, fast, mobile-friendly theme for daily lottery/number-result style sites (e.g. Teer results). Includes a custom post type for results, an admin settings screen for round times, and a filterable results archive — no more contradicting times or giant unpaginated tables.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teer-result-pro
*/

/* ==========================================================================
   1. Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1d29;
  background: #f5f6fa;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #2352c9; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
.skip-link {
  position: absolute; left: -999px; top: auto;
}
.skip-link:focus {
  position: fixed; left: 10px; top: 10px; z-index: 9999;
  background: #fff; padding: 10px 16px; border-radius: 6px;
}

/* ==========================================================================
   2. Header
   ========================================================================== */
.site-header {
  background: #12142b;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.site-branding { display: flex; flex-direction: column; }
.site-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}
.site-title:hover { text-decoration: none; opacity: .9; }
.site-tagline { font-size: .78rem; color: #9aa0c3; margin-top: 2px; }

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: #d8dbf0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 600;
  display: inline-block;
}
.main-nav a:hover,
.main-nav .current-menu-item a {
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: .9rem;
}

/* ==========================================================================
   3. Hero / today's results
   ========================================================================== */
.today-results {
  padding: 28px 0 8px;
}
.today-results .section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.section-heading h1, .section-heading h2 { font-size: 1.5rem; margin: 0; }
.updated-note { font-size: .82rem; color: #6b7085; }

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.result-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(20,22,50,.08), 0 1px 2px rgba(20,22,50,.04);
  border: 1px solid #ececf3;
}
.result-card__game {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 2px;
}
.result-card__date { font-size: .78rem; color: #6b7085; margin-bottom: 14px; }

.result-card__rounds {
  display: flex;
  gap: 12px;
}
.round-box {
  flex: 1;
  text-align: center;
  background: #f7f8fc;
  border-radius: 10px;
  padding: 12px 8px;
}
.round-box__label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7085;
  font-weight: 700;
  margin-bottom: 4px;
}
.round-box__time { font-size: .72rem; color: #9096ad; margin-bottom: 6px; }
.round-box__number {
  font-size: 1.9rem;
  font-weight: 800;
  color: #12142b;
  font-variant-numeric: tabular-nums;
}
.round-box__number.is-pending { color: #b3b7cc; font-size: 1.1rem; font-weight: 600; }
.round-box__number.is-off { color: #c94b4b; font-size: 1.1rem; font-weight: 700; }

.result-card.is-live { border-color: #2352c9; box-shadow: 0 0 0 2px rgba(35,82,201,.15); }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ecf1ff;
  color: #2352c9;
  font-size: .68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.live-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #2352c9;
}

/* ==========================================================================
   4. Content area
   ========================================================================== */
.content-wrap { padding: 32px 0 60px; }
.entry-content { background: #fff; border-radius: 14px; padding: 28px; border: 1px solid #ececf3; }
.entry-content h2 { font-size: 1.25rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.05rem; margin-top: 1.4em; }

/* ==========================================================================
   5. Archive / filterable results table
   ========================================================================== */
.archive-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 16px;
}
.archive-toolbar select,
.archive-toolbar input[type="search"] {
  padding: 9px 12px;
  border: 1px solid #d8dbe6;
  border-radius: 8px;
  font-size: .9rem;
  background: #fff;
}
.archive-toolbar input[type="search"] { flex: 1; min-width: 160px; }

.results-table-wrap { overflow-x: auto; border: 1px solid #ececf3; border-radius: 12px; }
table.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 420px;
}
.results-table th, .results-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid #f0f1f6;
  white-space: nowrap;
}
.results-table th:first-child, .results-table td:first-child { text-align: left; }
.results-table thead th {
  background: #f7f8fc;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7085;
  position: sticky; top: 0;
}
.results-table tbody tr:hover { background: #fafbff; }
.results-table td.num { font-weight: 700; font-variant-numeric: tabular-nums; }
.results-table td.off { color: #c94b4b; font-weight: 600; font-size: .82rem; }
.results-table td.pending { color: #9096ad; font-size: .82rem; }

.pagination { display: flex; gap: 6px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 13px; border-radius: 8px; font-size: .88rem;
  border: 1px solid #d8dbe6; background: #fff;
}
.pagination .current { background: #12142b; color: #fff; border-color: #12142b; }

.no-results { padding: 30px; text-align: center; color: #6b7085; }

/* ==========================================================================
   6. Sidebar widgets (common numbers, disclaimer box)
   ========================================================================== */
.info-box {
  background: #fff8ec;
  border: 1px solid #f2dfb3;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: .88rem;
  margin: 18px 0;
}
.info-box strong { display: block; margin-bottom: 4px; }

/* ==========================================================================
   7. Footer
   ========================================================================== */
.site-footer {
  background: #12142b;
  color: #b9bcd6;
  padding: 36px 0 22px;
  font-size: .86rem;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 22px;
}
.footer-grid h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: #b9bcd6; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 16px;
  font-size: .8rem;
  color: #7d81a0;
  text-align: center;
}
.footer-disclaimer { font-size: .78rem; color: #7d81a0; margin-bottom: 18px; line-height: 1.6; }

/* ==========================================================================
   8. Responsive
   ========================================================================== */
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .site-header .container { flex-direction: row; }
  .entry-content { padding: 18px; }
  .round-box__number { font-size: 1.5rem; }
}
