/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:        #f0f2f5;
  --bg2:       #e8eaed;
  --bg3:       #ffffff;
  --bg4:       #f7f8fa;
  --border:    #dde0e7;
  --primary:   #c0392b;
  --primary2:  #e74c3c;
  --primary-dim: rgba(192,57,43,0.08);
  --gold:      #e67e22;
  --gold2:     #f39c12;
  --gold-dim:  rgba(230,126,34,0.1);
  --green:     #27ae60;
  --green2:    #2ecc71;
  --blue:      #2980b9;
  --blue2:     #3498db;
  --text:      #1a1a2e;
  --text2:     #4a5568;
  --text3:     #718096;
  --text4:     #a0aec0;
  --r:         10px;
  --r-sm:      6px;
  --shadow:    0 2px 12px rgba(0,0,0,0.10);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.13);
  --font:      'Segoe UI', system-ui, -apple-system, sans-serif;
  --header-h:  60px;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: #c0c8d4; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===== LOADER ===== */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  transition: opacity 0.4s;
}
#page-loader.gone { opacity: 0; pointer-events: none; }
#page-loader p { font-size: 0.82rem; color: var(--text3); letter-spacing: 0.05em; }
.loader-ring {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary2);
  border-right-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SHARED ===== */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* ===== BADGES ===== */
.badge {
  font-size: 0.66rem; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 4px;
}
.badge-live   { background: rgba(192,57,43,0.12); color: var(--primary2); border: 1px solid rgba(192,57,43,0.25); animation: blink 1.8s ease infinite; }
.badge-open   { background: rgba(39,174,96,0.1); color: var(--green); border: 1px solid rgba(39,174,96,0.25); }
.badge-closed { background: rgba(160,174,192,0.1); color: var(--text3); border: 1px solid var(--border); }
.badge-waiting{ background: rgba(230,126,34,0.1); color: var(--gold); border: 1px solid rgba(230,126,34,0.22); }
.badge-active  { background: rgba(39,174,96,0.1); color: var(--green); border: 1px solid rgba(39,174,96,0.25); }
.badge-archived{ background: rgba(160,174,192,0.1); color: var(--text3); border: 1px solid var(--border); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.55} }

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff; font-weight: 700; font-size: 0.9rem;
  padding: 10px 22px; border-radius: var(--r-sm); border: none; cursor: pointer;
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 3px 12px rgba(192,57,43,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 5px 18px rgba(192,57,43,0.4); }
.btn-full { width: 100%; justify-content: center; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border); color: var(--text2);
  font-size: 0.88rem; padding: 9px 18px; border-radius: var(--r-sm); cursor: pointer; transition: all 0.2s;
}
.btn-ghost:hover { background: var(--bg2); color: var(--text); }
.btn-danger {
  background: rgba(192,57,43,0.08); border: 1px solid rgba(192,57,43,0.22); color: var(--primary2);
  font-size: 0.88rem; font-weight: 600; padding: 9px 18px; border-radius: var(--r-sm);
  cursor: pointer; transition: all 0.2s;
}
.btn-danger:hover { background: rgba(192,57,43,0.16); }
.btn-sm {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
  font-size: 0.8rem; padding: 7px 13px; border-radius: var(--r-sm); cursor: pointer; transition: all 0.2s;
}
.btn-sm:hover { color: var(--primary); border-color: var(--primary); }
.btn-sm-inline {
  background: var(--primary-dim); border: 1px solid rgba(192,57,43,0.2); color: var(--primary);
  font-size: 0.8rem; font-weight: 600; padding: 6px 14px; border-radius: var(--r-sm);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-sm-inline:hover { background: rgba(192,57,43,0.14); }
.btn-spinner {
  width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block;
}

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text2); }
.form-group input, .form-group select, .form-group textarea {
  background: #fff; border: 1px solid var(--border); color: var(--text);
  font-size: 0.9rem; padding: 10px 13px; border-radius: var(--r-sm);
  outline: none; transition: border-color 0.2s; font-family: var(--font); width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-error { font-size: 0.8rem; color: var(--primary2); min-height: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inp { background: #fff; border: 1px solid var(--border); color: var(--text); font-size: 0.85rem; padding: 8px 12px; border-radius: var(--r-sm); outline: none; }
.inp:focus { border-color: var(--primary); }
.sel { background: #fff; border: 1px solid var(--border); color: var(--text); font-size: 0.85rem; padding: 8px 12px; border-radius: var(--r-sm); outline: none; cursor: pointer; }

/* ===== PANEL ===== */
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 22px; box-shadow: var(--shadow); }
.panel-head {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel-body { padding: 18px 20px; }
.panel-body.p0 { padding: 0; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; min-width: 620px; }
thead th {
  background: linear-gradient(180deg, #f8f9fb 0%, #f0f2f5 100%);
  padding: 12px 16px; text-align: left;
  font-weight: 700; color: var(--text2); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
  border-bottom: 2px solid var(--border);
}
thead th:first-child { border-left: 3px solid var(--primary); }
tbody tr { border-top: 1px solid #f0f2f5; transition: background 0.15s; }
tbody tr:nth-child(even) { background: #fafbfc; }
tbody tr:hover { background: rgba(192,57,43,0.03); }
tbody td { padding: 11px 16px; vertical-align: middle; }
.td-num { font-weight: 700; font-size: 1rem; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.td-gold { color: var(--primary); }
.td-silver { color: var(--blue); }
.td-bronze { color: var(--gold); }
.td-muted { color: var(--text3); font-size: 0.8rem; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); border: 1px solid rgba(0,0,0,0.1); color: #fff;
  padding: 12px 22px; border-radius: 50px; font-size: 0.85rem; font-weight: 500;
  z-index: 9000; opacity: 0; transition: all 0.3s; pointer-events: none; white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); border-color: var(--green2); }
.toast.error { background: var(--primary); border-color: var(--primary2); }

/* ===== HEADER ===== */
#site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--primary);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  height: var(--header-h);
}
.hdr-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 0; height: var(--header-h);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 800; white-space: nowrap; text-decoration: none; color: #fff;
  margin-right: 20px;
}
.logo-img {
  height: 36px; width: auto; object-fit: contain;
  flex-shrink: 0;
}
.logo-img-brand {
  height: 44px; width: auto; object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}
.logo-text { color: #fff; font-weight: 800; }
.footer-logo .logo-img { height: 32px; }
.footer-logo .logo-img-brand { height: 36px; }

#main-nav { display: flex; gap: 0; align-items: center; }
.nav-link {
  padding: 0 13px; height: var(--header-h); display: flex; align-items: center;
  font-size: 0.83rem; font-weight: 600; color: rgba(255,255,255,0.82);
  transition: all 0.2s; border-bottom: 3px solid transparent; position: relative;
}
.nav-link:hover { color: #fff; background: rgba(0,0,0,0.1); }
.nav-link.active { color: #fff; border-bottom-color: #fff; background: rgba(0,0,0,0.12); }

.hdr-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: 20px; flex-shrink: 0;
}
.hdr-nav { display: flex; gap: 0; align-items: center; }
.hdr-mobile-btn {
  display: none; background: none; border: none; cursor: pointer;
  color: #fff; padding: 6px; margin-left: auto;
}
.mobile-nav-inner { display: flex; flex-direction: column; gap: 2px; }
.mobile-nav-link { padding: 11px 14px; border-radius: var(--r-sm); font-size: 0.9rem; color: var(--text2); transition: all 0.2s; }
.mobile-nav-link:hover, .mobile-nav-link.active { background: var(--primary-dim); color: var(--primary); font-weight: 600; }
@media (max-width: 720px) {
  .hdr-nav { display: none; }
  .hdr-mobile-btn { display: flex; }
}
.site-header { transition: box-shadow 0.2s; }
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.25); }
.hdr-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.live-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; color: #fff;
  letter-spacing: 0.04em;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fff; flex-shrink: 0;
  animation: pulse-w 1.6s ease infinite;
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--green2); animation: pulse-g 1.6s ease infinite; }
@keyframes pulse-w { 0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(255,255,255,.6)} 50%{opacity:.8;box-shadow:0 0 0 5px rgba(255,255,255,0)} }
@keyframes pulse-g { 0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(46,204,113,.6)} 50%{opacity:.8;box-shadow:0 0 0 5px rgba(46,204,113,0)} }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: #fff; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }
.mobile-nav {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0;
  background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  padding: 8px 16px 16px; z-index: 99; flex-direction: column; gap: 2px;
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 11px 14px; border-radius: var(--r-sm); font-size: 0.9rem; color: var(--text2); transition: all 0.2s; }
.mobile-nav a:hover, .mobile-nav a.active { background: var(--primary-dim); color: var(--primary); font-weight: 600; }
.btn-refresh {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff;
  font-size: 0.8rem; font-weight: 600; padding: 7px 14px; border-radius: var(--r-sm); cursor: pointer; transition: all 0.2s;
}
.btn-refresh:hover { background: rgba(255,255,255,0.25); }
.btn-refresh.spinning svg { animation: spin 0.6s linear; }

/* ===== WEATHER BAR ===== */
.weather-bar {
  background: #1a1a2e; color: rgba(255,255,255,0.85); font-size: 0.76rem;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.weather-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.weather-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.weather-item { display: flex; align-items: center; gap: 5px; }
.weather-item svg { opacity: 0.6; flex-shrink: 0; }
.weather-loc { font-weight: 700; color: #fff; }
.weather-temp { color: var(--gold2); font-weight: 700; }
.weather-right { display: flex; align-items: center; gap: 8px; }
.wib-label { font-size: 0.7rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.05em; }
.wib-clock { font-size: 0.85rem; font-weight: 700; color: #fff; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }

/* ===== TICKER BAR ===== */
.ticker-bar {
  background: #222; color: #fff; font-size: 0.78rem; padding: 7px 0;
  display: flex; align-items: center; overflow: hidden;
  border-bottom: 2px solid var(--primary);
}
.ticker-label {
  background: var(--primary); color: #fff; font-weight: 700; font-size: 0.72rem;
  padding: 4px 14px; white-space: nowrap; flex-shrink: 0; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-inner {
  display: flex; gap: 40px; white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.ticker-inner:hover { animation-play-state: paused; }
@keyframes ticker { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }
.ticker-item { color: rgba(255,255,255,0.85); }
.ticker-item strong { color: var(--gold2); }

/* ===== HERO/BANNER AREA ===== */
.hero-area {
  background: linear-gradient(135deg, #c0392b 0%, #922b21 50%, #7b241c 100%);
  padding: 0; position: relative; overflow: hidden;
}
.hero-area::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 30px, rgba(255,255,255,0.02) 30px, rgba(255,255,255,0.02) 31px);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 180px; gap: 24px;
}
.hero-text { padding: 32px 0; }
.hero-title {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; color: #fff;
  line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 8px;
}
.hero-title span { color: var(--gold2); }
.hero-sub { font-size: 0.9rem; color: rgba(255,255,255,0.75); margin-bottom: 20px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--primary); font-weight: 700; font-size: 0.85rem;
  padding: 10px 22px; border-radius: var(--r-sm); cursor: pointer; border: none;
  transition: all 0.2s; box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.hero-btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; font-size: 0.85rem;
  padding: 10px 22px; border-radius: var(--r-sm); cursor: pointer; border: 1px solid rgba(255,255,255,0.3);
  transition: all 0.2s; text-decoration: none;
}
.hero-btn-outline:hover { background: rgba(255,255,255,0.22); }
.hero-stats-row { display: flex; gap: 24px; flex-wrap: wrap; }
.hero-stat-item { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-num { font-size: 1.6rem; font-weight: 900; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-stat-lbl { font-size: 0.72rem; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 0.05em; }
.hero-deco {
  position: absolute; right: 0; top: 0; bottom: 0; width: 380px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 100%);
}
.hero-deco-balls {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  display: flex; gap: 10px; align-items: center;
}
.deco-ball {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 900; color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3), inset 0 3px 0 rgba(255,255,255,0.3), inset 0 -3px 0 rgba(0,0,0,0.15);
}
.deco-ball-1 { background: radial-gradient(circle at 35% 30%, #f8a055, #d4500a); }
.deco-ball-2 { background: radial-gradient(circle at 35% 30%, #5bc0f8, #0a56c4); }
.deco-ball-3 { background: radial-gradient(circle at 35% 30%, #74e094, #0a8a30); }
.deco-ball-4 { background: radial-gradient(circle at 35% 30%, #f8e05c, #c89400); }

/* ===== DATE/STATUS BAR ===== */
.date-bar {
  background: #fff; border-bottom: 1px solid var(--border); padding: 0;
}
.date-bar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  height: 46px; gap: 16px;
}
.date-bar-left { display: flex; align-items: center; gap: 16px; }
.date-text { font-size: 0.82rem; font-weight: 600; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.date-text svg { color: var(--primary); opacity: 0.7; }
.online-chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(39,174,96,0.08); border: 1px solid rgba(39,174,96,0.2);
  padding: 4px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; color: var(--green);
}
.date-bar-right { display: flex; align-items: center; gap: 10px; }
.update-text { font-size: 0.75rem; color: var(--text3); }

/* ===== COUNTDOWN SECTION ===== */
.countdown-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #2c1810 100%);
  padding: 20px 0; border-bottom: 3px solid var(--primary);
}
.countdown-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.countdown-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5); margin-bottom: 6px;
}
.countdown-title {
  font-size: 1rem; font-weight: 800; color: #fff; letter-spacing: 0.02em;
}
.countdown-title span { color: var(--gold2); }
.countdown-digits {
  display: flex; align-items: center; gap: 8px;
}
.cd-block {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.cd-num {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; padding: 10px 16px;
  font-size: 1.8rem; font-weight: 900; color: #fff; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em; min-width: 64px; text-align: center;
  font-family: 'Courier New', monospace;
}
.cd-lbl { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.45); }
.cd-sep { font-size: 1.6rem; font-weight: 900; color: var(--gold); line-height: 1; margin-top: -6px; }
.countdown-market-info { text-align: right; }
.cd-mkt-name { font-size: 0.85rem; font-weight: 700; color: #fff; }
.cd-mkt-time { font-size: 0.75rem; color: rgba(255,255,255,0.5); margin-top: 3px; }

/* ===== MARKET TABS ===== */
.market-tabs-wrap {
  background: #fff; border-bottom: 2px solid var(--border); position: sticky; top: var(--header-h); z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.market-tabs {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
}
.market-tabs::-webkit-scrollbar { display: none; }
.mkt-tab {
  padding: 0 18px; height: 48px; display: flex; align-items: center; white-space: nowrap;
  font-size: 0.85rem; font-weight: 600; color: var(--text3);
  border-bottom: 3px solid transparent; cursor: pointer;
  background: none; border-top: none; border-left: none; border-right: none;
  transition: all 0.2s; font-family: var(--font);
}
.mkt-tab:hover { color: var(--primary); background: var(--primary-dim); }
.mkt-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* ===== MAIN LAYOUT ===== */
.main-layout {
  max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px;
  display: grid; grid-template-columns: 1fr 280px; gap: 20px;
}
.main-col {}
.section-title {
  font-size: 0.95rem; font-weight: 800; color: var(--text); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px; padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.section-title::before {
  content: ''; display: block; width: 4px; height: 16px;
  background: linear-gradient(180deg, var(--primary), var(--gold));
  border-radius: 2px;
}
.section-chip {
  font-size: 0.72rem; color: var(--text3); border: 1px solid var(--border); padding: 3px 9px; border-radius: 20px;
  font-weight: 500; margin-left: auto;
}

/* ===== RESULT CARDS GRID ===== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.skeleton-card {
  height: 220px; border-radius: var(--r);
  background: linear-gradient(90deg, var(--bg2) 25%, #fff 50%, var(--bg2) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== RESULT CARD ===== */
.result-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  border-top: 4px solid var(--primary);
}
.result-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(192,57,43,0.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--border); gap: 8px;
}
.rc-head-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.rc-head-flag { width: 3px; height: 16px; background: linear-gradient(180deg, var(--primary), var(--gold)); border-radius: 2px; flex-shrink: 0; }
.rc-name {
  font-size: 0.82rem; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.rc-date {
  font-size: 0.67rem; color: var(--text3); padding: 5px 14px;
  border-bottom: 1px solid #f0f2f5;
  display: flex; align-items: center; gap: 5px;
}
.rc-results { padding: 10px 14px 8px; flex: 1; display: flex; flex-direction: column; gap: 0; }
.rc-prize-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid #f0f2f5;
}
.rc-prize-row:last-child { border-bottom: none; }
.rc-prize-rank {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 800; flex-shrink: 0;
}
.rc-prize-rank-1 { background: linear-gradient(135deg,#f39c12,#e67e22); color: #fff; }
.rc-prize-rank-2 { background: linear-gradient(135deg,#3498db,#2980b9); color: #fff; }
.rc-prize-rank-3 { background: linear-gradient(135deg,#e74c3c,#c0392b); color: #fff; }
.rc-prize-right { flex: 1; }
.rc-prize-label {
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text4); margin-bottom: 4px; display: flex; align-items: center; gap: 6px;
}
.rc-result-time {
  font-size: 0.58rem; color: var(--text3); background: var(--bg2); border-radius: 8px; padding: 1px 5px;
}
.rc-digit-boxes { display: flex; gap: 5px; flex-wrap: nowrap; }
.rc-digit {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 900; color: #fff;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0; position: relative;
}
.rc-digit.pop { animation: digitPop 0.35s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes digitPop { 0% { transform: scale(0.4); opacity: 0.3; } 100% { transform: scale(1); opacity: 1; } }
.rc-prize-row:nth-child(1) .rc-digit { background: radial-gradient(circle at 35% 28%,#f5b041,#d35400); box-shadow: 0 3px 10px rgba(211,84,0,0.4); }
.rc-prize-row:nth-child(1) .rc-digit.empty { background: #f0f2f5; color: var(--text4); box-shadow: none; }
.rc-prize-row:nth-child(2) .rc-digit { background: radial-gradient(circle at 35% 28%,#5dade2,#1a5276); box-shadow: 0 3px 10px rgba(26,82,118,0.35); }
.rc-prize-row:nth-child(2) .rc-digit.empty { background: #f0f2f5; color: var(--text4); box-shadow: none; }
.rc-prize-row:nth-child(3) .rc-digit { background: radial-gradient(circle at 35% 28%,#ec7063,#922b21); box-shadow: 0 3px 10px rgba(146,43,33,0.35); }
.rc-prize-row:nth-child(3) .rc-digit.empty { background: #f0f2f5; color: var(--text4); box-shadow: none; }

/* ===== SPECIAL & CONSOLATION PRIZES ===== */
.special-prizes-section { margin-top: 20px; }
.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sp-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow);
}
.sp-head {
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.sp-head.gold { background: linear-gradient(90deg, rgba(230,126,34,0.08) 0%, transparent 100%); border-left: 3px solid var(--gold); }
.sp-head.blue { background: linear-gradient(90deg, rgba(52,152,219,0.08) 0%, transparent 100%); border-left: 3px solid var(--blue2); }
.sp-head-title { font-size: 0.78rem; font-weight: 800; color: var(--text2); text-transform: uppercase; letter-spacing: 0.04em; }
.sp-body { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.sp-num {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg4); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 12px;
  font-size: 1.1rem; font-weight: 900; letter-spacing: 0.1em; font-variant-numeric: tabular-nums;
  color: var(--text); transition: all 0.2s; min-width: 64px;
}
.sp-num:hover { background: var(--primary-dim); border-color: var(--primary); color: var(--primary); }
.sp-num.gold-num { color: var(--gold); border-color: rgba(230,126,34,0.3); }
.sp-num.blue-num { color: var(--blue); border-color: rgba(41,128,185,0.3); }

/* ===== COUNTDOWN ===== */
.rc-countdown {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 14px 7px; gap: 8px;
  background: #fafbfc; border-top: 1px solid #f0f2f5;
}
.rc-cdlabel { font-size: 0.62rem; color: var(--text4); text-transform: uppercase; letter-spacing: 0.05em; }
.rc-timer { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; color: var(--primary); }
.rc-timer.urgent { color: var(--primary2); }
.rc-timer.done { color: var(--text4); }
.rc-footer {
  padding: 8px 14px 10px;
  display: flex; gap: 7px;
  border-top: 1px solid #f0f2f5;
}
.rc-btn {
  flex: 1; text-align: center;
  background: var(--primary); color: #fff;
  border: none; font-size: 0.75rem; font-weight: 700; padding: 8px 8px;
  border-radius: 6px; cursor: pointer; transition: all 0.18s; letter-spacing: 0.02em;
}
.rc-btn:hover { background: var(--primary2); }
.rc-share {
  background: var(--bg2); border: 1px solid var(--border); color: var(--text3);
  padding: 8px 11px; border-radius: 6px; cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center;
}
.rc-share:hover { background: var(--primary-dim); color: var(--primary); border-color: var(--primary); }

/* ===== HISTORY TABLE ===== */
.hist-section { padding: 0 0 32px; }
.hist-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hist-table-wrap { display: block; }
.hist-mobile-list-wrap { display: none; }
.hist-mobile-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; margin-bottom: 10px;
  border-left: 3px solid var(--primary);
}
.hmc-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 10px 14px 9px; border-bottom: 1px solid var(--border);
  background: #fafbfc; gap: 10px;
}
.hmc-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hmc-market { font-size: 0.86rem; font-weight: 700; color: var(--text); }
.hmc-period { font-size: 0.7rem; color: var(--text3); }
.hmc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.hmc-date { font-size: 0.7rem; color: var(--text3); }
.hmc-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.hmc-nums-3 { grid-template-columns: repeat(3, 1fr); }
.hmc-num-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 10px 4px; border-right: 1px solid var(--border); }
.hmc-num-item:last-child { border-right: none; }
.hmc-rank { font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text4); }
.hmc-val { font-size: 1.1rem; font-weight: 800; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--text); }
.hmc-gold .hmc-rank { color: var(--gold); }
.hmc-gold .hmc-val { color: var(--primary); }
.hmc-silver .hmc-val { color: var(--blue); }
.hmc-bronze .hmc-val { color: var(--gold); }
.hist-empty { padding: 28px; text-align: center; color: var(--text3); font-size: 0.85rem; }

/* ===== PAGE CONTENT SECTIONS ===== */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header h1 { font-size: 1.3rem; font-weight: 900; color: var(--text); display: flex; align-items: center; gap: 10px; }
.page-header h1::before { content:''; display:block; width:5px; height:20px; background:linear-gradient(180deg,var(--primary),var(--gold)); border-radius:3px; }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 14px 16px; margin-bottom: 20px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.filter-bar label { font-size: 0.8rem; font-weight: 600; color: var(--text2); white-space: nowrap; }
.filter-group { display: flex; align-items: center; gap: 8px; }

/* ===== STAT CARDS ===== */
.stat-cards-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.stat-card-icon.red { background: var(--primary-dim); color: var(--primary); }
.stat-card-icon.gold { background: var(--gold-dim); color: var(--gold); }
.stat-card-icon.green { background: rgba(39,174,96,0.1); color: var(--green); }
.stat-card-icon.blue { background: rgba(41,128,185,0.1); color: var(--blue2); }
.stat-card-num { font-size: 1.5rem; font-weight: 900; color: var(--text); line-height: 1; margin-bottom: 3px; }
.stat-card-label { font-size: 0.75rem; color: var(--text3); }

/* ===== STATISTICS PAGE ===== */
.freq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.freq-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow);
}
.freq-head { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.8rem; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.04em; }
.freq-head.hot { border-left: 3px solid var(--primary); }
.freq-head.cold { border-left: 3px solid var(--blue2); }
.freq-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.freq-row { display: flex; align-items: center; gap: 12px; }
.freq-num { font-size: 1.1rem; font-weight: 900; min-width: 48px; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.freq-bar-wrap { flex: 1; height: 8px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.freq-bar { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.freq-bar.hot { background: linear-gradient(90deg, var(--primary), var(--primary2)); }
.freq-bar.cold { background: linear-gradient(90deg, var(--blue), var(--blue2)); }
.freq-count { font-size: 0.75rem; color: var(--text3); min-width: 28px; text-align: right; }

/* ===== ANALYSIS/BLOG CARDS ===== */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.article-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow); transition: all 0.2s;
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-card-img { width: 100%; height: 160px; object-fit: cover; }
.article-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.article-cat {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--primary); margin-bottom: 7px;
}
.article-card-title { font-size: 0.92rem; font-weight: 700; color: var(--text); line-height: 1.4; margin-bottom: 8px; }
.article-card-excerpt { font-size: 0.8rem; color: var(--text3); line-height: 1.6; flex: 1; }
.article-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--border);
  font-size: 0.75rem; color: var(--text3);
}
.article-card-footer a { color: var(--primary); font-weight: 600; }
.article-card-footer a:hover { text-decoration: underline; }

/* ===== DREAM BOOK PAGE ===== */
.dream-search-bar {
  display: flex; gap: 10px; margin-bottom: 20px; align-items: center; flex-wrap: wrap;
}
.dream-search-bar input {
  flex: 1; min-width: 200px; background: #fff; border: 1px solid var(--border);
  padding: 11px 16px; border-radius: var(--r-sm); font-size: 0.9rem; outline: none; color: var(--text);
  transition: border-color 0.2s;
}
.dream-search-bar input:focus { border-color: var(--primary); }
.dream-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.dream-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px; box-shadow: var(--shadow); transition: all 0.2s;
  border-top: 3px solid var(--gold);
}
.dream-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dream-keyword { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.dream-interp { font-size: 0.82rem; color: var(--text2); line-height: 1.6; margin-bottom: 12px; }
.dream-nums-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dream-num-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px;
  min-width: 52px;
}
.dream-num-chip span:first-child { font-size: 0.6rem; color: var(--text4); text-transform: uppercase; letter-spacing: 0.06em; }
.dream-num-chip span:last-child { font-size: 0.95rem; font-weight: 800; color: var(--primary); letter-spacing: 0.06em; }
.dream-cat-chip {
  font-size: 0.68rem; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(230,126,34,0.25);
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* ===== PRIMBON PAGE ===== */
.primbon-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.primbon-cat-btn {
  padding: 6px 16px; border-radius: 20px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--border); background: #fff; color: var(--text2); cursor: pointer; transition: all 0.2s;
}
.primbon-cat-btn:hover, .primbon-cat-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.primbon-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 12px;
  border-left: 4px solid var(--gold);
}
.primbon-card-title { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.primbon-card-content { font-size: 0.85rem; color: var(--text2); line-height: 1.7; }
.primbon-cat-badge { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 12px; background: var(--gold-dim); color: var(--gold); margin-left: 8px; text-transform: capitalize; }

/* ===== GENERATOR PAGE ===== */
.generator-wrap {
  max-width: 560px; margin: 0 auto; padding: 32px 0;
}
.gen-type-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.gen-type-btn {
  padding: 8px 22px; border-radius: 20px; font-size: 0.85rem; font-weight: 700;
  border: 2px solid var(--border); background: #fff; color: var(--text3); cursor: pointer; transition: all 0.2s;
}
.gen-type-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.gen-card {
  background: var(--primary);
  background-image: linear-gradient(180deg, #d44040 0%, #a93226 100%);
  border-radius: 16px; border: 3px solid #7b241c;
  box-shadow: var(--shadow-md); padding: 28px 24px;
  display: flex; flex-direction: column; gap: 20px; align-items: center;
}
.gen-balls-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.gen-slot {
  background: linear-gradient(180deg, #f8f8f8 0%, #e8e8e8 100%);
  border-radius: 8px; border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25), inset 0 1px 2px rgba(255,255,255,1);
  display: flex; align-items: center; justify-content: center; padding: 10px 6px; width: 68px; height: 72px;
}
.ngb-ball { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; }
.ngb-ball::after { content: ''; position: absolute; top: 7px; left: 11px; width: 13px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.5); transform: rotate(-35deg); pointer-events: none; z-index: 2; }
.ngb-color-0 { background: radial-gradient(circle at 36% 30%, #5ba3f0 0%, #1a52b0 50%, #0a2870 100%); box-shadow: 0 0 0 3px rgba(255,255,255,0.2), 0 3px 10px rgba(10,40,112,0.6); }
.ngb-color-1 { background: radial-gradient(circle at 36% 30%, #ffb060 0%, #e06800 50%, #7a3600 100%); box-shadow: 0 0 0 3px rgba(255,255,255,0.2), 0 3px 10px rgba(120,50,0,0.6); }
.ngb-color-2 { background: radial-gradient(circle at 36% 30%, #6ee07a 0%, #1e9030 50%, #0a4a12 100%); box-shadow: 0 0 0 3px rgba(255,255,255,0.2), 0 3px 10px rgba(10,74,18,0.6); }
.ngb-color-3 { background: radial-gradient(circle at 36% 30%, #6adcf8 0%, #0ea8d8 50%, #044c70 100%); box-shadow: 0 0 0 3px rgba(255,255,255,0.2), 0 3px 10px rgba(4,76,112,0.6); }
.ngb-inner { font-size: 1.4rem; font-weight: 900; color: #fff; line-height: 1; position: relative; z-index: 1; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgba(0,0,0,0.5); display: block; }
.ngb-ball.ng-spin { animation: ngb-spin 0.08s linear infinite; }
.ngb-ball.ng-land { animation: ngb-land 0.5s cubic-bezier(0.22,1.5,0.4,1); }
@keyframes ngb-spin { 0%,100%{transform:scale(1)} 50%{transform:scale(0.85)} }
@keyframes ngb-land { 0%{transform:scale(0.4) rotate(-15deg);opacity:0.2} 55%{transform:scale(1.22) rotate(4deg);opacity:1} 78%{transform:scale(0.95) rotate(-1deg)} 100%{transform:scale(1) rotate(0deg)} }
.gen-btn {
  display: block; width: 100%; max-width: 220px;
  background: linear-gradient(180deg, #ffe040 0%, #f5c500 45%, #d9a800 100%);
  color: #4a2800; font-size: 0.92rem; font-weight: 800; padding: 14px 20px;
  border-radius: 8px; border: 2px solid #b08000; cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: all 0.15s ease; font-family: inherit; letter-spacing: 0.03em;
  position: relative; overflow: hidden; text-align: center;
}
.gen-btn::before { content:''; position:absolute; top:0; left:-110%; width:70%; height:100%; background:linear-gradient(90deg,transparent,rgba(255,255,255,0.3),transparent); transition:left 0.5s; }
.gen-btn:hover::before { left: 130%; }
.gen-btn:hover { transform: translateY(-1px); }
.gen-btn:active { transform: translateY(1px); }
.gen-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.gen-history-wrap { width: 100%; }
.gen-history-title { font-size: 0.72rem; color: rgba(255,255,255,0.6); text-align: center; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.gen-history-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ng-hist-chip {
  font-size: 0.82rem; font-weight: 800; padding: 4px 12px; border-radius: 20px;
  background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.9);
  letter-spacing: 0.15em; animation: ng-fadein 0.3s ease both; font-variant-numeric: tabular-nums; cursor: default;
}
@keyframes ng-fadein { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:none} }
.gen-result-display {
  background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px; padding: 16px 24px; width: 100%; text-align: center;
}
.gen-result-num {
  font-size: 3rem; font-weight: 900; color: var(--gold2); letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums; line-height: 1; text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.gen-result-lbl { font-size: 0.72rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; }

/* ===== NUMBER GENERATOR SIDEBAR WIDGET ===== */
#numgen-sdb-card { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; overflow: visible !important; }
.numgen-card {
  background: var(--primary);
  background-image: linear-gradient(180deg, #d44040 0%, #a93226 100%);
  border-radius: 10px; border: 3px solid #7b241c;
  box-shadow: var(--shadow-md); padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.numgen-balls-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.numgen-slot {
  background: linear-gradient(180deg, #f8f8f8 0%, #e8e8e8 100%);
  border-radius: 6px; border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25), inset 0 1px 2px rgba(255,255,255,1);
  display: flex; align-items: center; justify-content: center; padding: 7px 3px; aspect-ratio: 1 / 1.05;
}
.numgen-btn-row { padding: 0; }
.numgen-gen-btn {
  display: block; width: 100%;
  background: linear-gradient(180deg, #ffe040 0%, #f5c500 45%, #d9a800 100%);
  color: #4a2800; font-size: 0.82rem; font-weight: 800; padding: 10px 14px;
  border-radius: 6px; border: 2px solid #b08000; cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: all 0.15s ease; font-family: inherit; letter-spacing: 0.02em;
  position: relative; overflow: hidden; text-align: center;
}
.numgen-gen-btn::before { content:''; position:absolute; top:0; left:-110%; width:70%; height:100%; background:linear-gradient(90deg,transparent,rgba(255,255,255,0.3),transparent); transition:left 0.5s; }
.numgen-gen-btn:hover::before { left: 130%; }
.numgen-gen-btn:hover { background: linear-gradient(180deg,#ffea55 0%,#ffd200 45%,#e6b400 100%); transform: translateY(-1px); }
.numgen-gen-btn:active { transform: translateY(1px); }
.numgen-gen-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.numgen-history-wrap { padding: 0; }
.numgen-history-row { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; min-height: 4px; }

/* ===== RESULT DETAIL MODAL ===== */
.rdm-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.rdm-overlay.open { opacity: 1; visibility: visible; }
.rdm-box {
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 460px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: translateY(16px) scale(0.97); transition: transform 0.28s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden; position: relative;
}
.rdm-overlay.open .rdm-box { transform: translateY(0) scale(1); }
.rdm-close { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.15); border: none; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; transition: all 0.2s; }
.rdm-close:hover { background: rgba(255,255,255,0.25); }
.rdm-header { padding: 22px 24px 16px; background: linear-gradient(135deg, var(--primary) 0%, #7b241c 100%); }
.rdm-market-name { font-size: 1.3rem; font-weight: 800; color: #fff; }
.rdm-date { font-size: 0.78rem; color: rgba(255,255,255,0.65); margin-top: 3px; }
.rdm-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.rdm-prize-row { display: flex; align-items: center; gap: 14px; background: var(--bg4); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; transition: background 0.2s; }
.rdm-prize-row:hover { background: var(--bg2); }
.rdm-rank-badge { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; flex-shrink: 0; }
.rdm-rank-1 { background: linear-gradient(135deg,#f39c12,#e67e22); color: #fff; }
.rdm-rank-2 { background: linear-gradient(135deg,#3498db,#2980b9); color: #fff; }
.rdm-rank-3 { background: linear-gradient(135deg,#e74c3c,#c0392b); color: #fff; }
.rdm-prize-info { flex: 1; }
.rdm-prize-label { font-size: 0.7rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.rdm-num { font-size: 1.5rem; font-weight: 900; color: var(--text); letter-spacing: 0.1em; }
.rdm-special-section { border-top: 1px solid var(--border); padding-top: 12px; }
.rdm-special-title { font-size: 0.72rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.rdm-special-nums { display: flex; flex-wrap: wrap; gap: 6px; }
.rdm-special-num { background: var(--bg4); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-size: 0.88rem; font-weight: 700; letter-spacing: 0.06em; }
.rdm-footer { padding: 14px 20px 18px; border-top: 1px solid var(--border); display: flex; justify-content: center; }
.rdm-close-btn { background: var(--primary); color: #fff; border: none; border-radius: 8px; padding: 10px 36px; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.rdm-close-btn:hover { background: var(--primary2); }

/* ===== SECTION HEAD ===== */
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 0 14px; gap: 12px; }
.section-head h2 { font-size: 0.95rem; font-weight: 800; display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.section-head h2::before { content:''; display:block; width:4px; height:16px; background:linear-gradient(180deg,var(--primary),var(--gold)); border-radius:2px; }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sdb-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.sdb-head {
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(192,57,43,0.06) 0%, transparent 100%);
  font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--text2);
  border-left: 3px solid var(--primary); text-transform: uppercase; letter-spacing: 0.04em;
}
.sdb-body { padding: 12px 16px; }
.qlink { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 0.82rem; color: var(--text2); transition: color 0.2s; }
.qlink::before { content: '›'; color: var(--primary); font-size: 1.1rem; }
.qlink:last-child { border-bottom: none; padding-bottom: 0; }
.qlink:hover { color: var(--primary); }
.info-box { background: rgba(192,57,43,0.04); border: 1px solid rgba(192,57,43,0.12); border-radius: var(--r-sm); padding: 12px; font-size: 0.81rem; color: var(--text2); line-height: 1.6; }
.info-box strong { color: var(--primary); }

/* ===== NOTICE BAR ===== */
.notice-bar {
  display: flex; align-items: flex-start; gap: 12px;
  background: rgba(230,126,34,0.06); border: 1px solid rgba(230,126,34,0.18); border-left: 3px solid var(--gold);
  border-radius: var(--r); padding: 11px 16px; margin-bottom: 16px;
  font-size: 0.82rem; color: var(--text2);
}
.notice-bar strong { color: var(--gold); margin-right: 6px; }
.notice-icon { font-size: 1rem; margin-top: 1px; flex-shrink: 0; }

/* ===== WELCOME SECTION ===== */
.welcome-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #2c1810 100%);
  padding: 40px 0; margin-top: 0;
}
.welcome-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.welcome-text h2 {
  font-size: 1.4rem; font-weight: 900; color: #fff; margin-bottom: 12px; line-height: 1.3;
}
.welcome-text h2 span { color: var(--gold2); }
.welcome-text p { font-size: 0.88rem; color: rgba(255,255,255,0.65); line-height: 1.8; }
.welcome-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wlink-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r); padding: 14px 16px;
  display: flex; align-items: center; gap: 10px; transition: all 0.2s;
  color: rgba(255,255,255,0.8); font-size: 0.82rem; font-weight: 600; text-decoration: none;
}
.wlink-btn:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.25); }
.wlink-btn svg { color: var(--gold2); flex-shrink: 0; }

/* ===== SOCIAL LINKS ===== */
.social-bar {
  display: flex; align-items: center; gap: 8px;
}
.soc-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7);
  transition: all 0.2s; font-size: 0.75rem; font-weight: 700;
}
.soc-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== FOOTER ===== */
footer, .site-footer { background: #2c3e50; padding: 40px 0 20px; margin-top: 8px; border-top: 3px solid var(--primary); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-brand .logo { margin-bottom: 10px; }
.footer-brand p { font-size: 0.81rem; color: rgba(255,255,255,0.5); line-height: 1.7; max-width: 230px; }
.footer-col h4 { font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.85); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold2); }
.footer-social { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.footer-soc-btn {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6);
  transition: all 0.2s; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
}
.footer-soc-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.disclaimer { max-width: 480px; line-height: 1.6; text-align: right; }

/* ===== BACK TO TOP ===== */
#back-top {
  position: fixed; right: 20px; bottom: 24px; width: 40px; height: 40px;
  background: var(--primary); border: none; color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.25s; z-index: 80;
  opacity: 0; pointer-events: none;
  box-shadow: 0 4px 16px rgba(192,57,43,0.4);
}
#back-top.visible { opacity: 1; pointer-events: auto; }
#back-top:hover { background: var(--primary2); transform: translateY(-3px); }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 20px 0; }
.pg-btn {
  min-width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: #fff; color: var(--text2); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; padding: 0 10px;
}
.pg-btn:hover { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .sdb-card { flex: 1; min-width: 240px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .welcome-inner { grid-template-columns: 1fr; }
  .sp-grid { grid-template-columns: 1fr; }
  .freq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  #main-nav { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-bottom { flex-direction: column; }
  .disclaimer { text-align: left; }
  .form-row { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; align-items: flex-start; min-height: auto; padding: 24px 0; }
  .hero-deco-balls { display: none; }
  .hero-title { font-size: 1.4rem; }
  .countdown-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .countdown-market-info { text-align: left; }
  .welcome-links { grid-template-columns: 1fr; }
  .weather-left { gap: 10px; }
}
@media (max-width: 640px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hist-table-wrap { display: none; }
  .hist-mobile-list-wrap { display: block; }
  .rc-digit { width: 32px; height: 32px; font-size: 0.88rem; }
  .rc-digit-boxes { gap: 4px; }
  .rc-results { padding: 7px 10px 6px; }
  .rc-prize-row { padding: 7px 0; gap: 8px; }
  .rc-prize-rank { display: none; }
  .article-grid { grid-template-columns: 1fr; }
  .dream-cards-grid { grid-template-columns: 1fr; }
  .cd-num { font-size: 1.4rem; min-width: 50px; padding: 8px 12px; }
}
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .rc-digit { width: 28px; height: 28px; font-size: 0.8rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .sidebar { flex-direction: column; }
  .hero-deco { display: none; }
  .main-layout { padding: 14px 12px 30px; gap: 14px; }
  .wrap { padding: 0 12px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hist-controls { width: 100%; }
  .hist-controls .sel { flex: 1; }
  .footer-bottom { flex-direction: column; }
  .disclaimer { text-align: left; }
  .hmc-val { font-size: 0.95rem; }
  .gen-balls-row { gap: 8px; }
  .gen-slot { width: 56px; height: 60px; }
}

/* ===== BACK TO TOP (class variant) ===== */
.back-to-top {
  position: fixed; right: 20px; bottom: 24px; width: 40px; height: 40px;
  background: var(--primary); border: none; color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.25s; z-index: 80;
  opacity: 0; pointer-events: none;
  box-shadow: 0 4px 16px rgba(192,57,43,0.4);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--primary2); transform: translateY(-3px); }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.main-wrap { padding: 24px 0 48px; }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #2c1810 100%);
  padding: 28px 0 22px; border-bottom: 3px solid var(--primary);
}
.page-header-title { color: #fff; font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.page-header-sub { color: rgba(255,255,255,0.65); font-size: 0.88rem; margin-bottom: 10px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; }
.bc-link { color: rgba(255,255,255,0.55); transition: color 0.2s; }
.bc-link:hover { color: #fff; }
.bc-sep { color: rgba(255,255,255,0.35); }
.bc-current { color: var(--gold2); font-weight: 600; }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  margin-bottom: 20px; box-shadow: var(--shadow);
}
.filter-group { display: flex; flex-direction: column; gap: 5px; min-width: 140px; }
.filter-group-btn { flex-direction: row; align-items: flex-end; gap: 8px; }
.filter-label { font-size: 0.75rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.04em; }
.filter-select, .filter-input {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 0.88rem; color: var(--text); background: #fff; outline: none;
  transition: border-color 0.2s; height: 36px;
}
.filter-select:focus, .filter-input:focus { border-color: var(--primary); }
.filter-btn {
  padding: 0 18px; height: 36px; background: var(--primary); color: #fff;
  border: none; border-radius: var(--r-sm); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s; white-space: nowrap;
}
.filter-btn:hover { background: var(--primary2); }
.filter-btn.secondary { background: var(--bg2); color: var(--text2); }
.filter-btn.secondary:hover { background: var(--bg); }

/* ===== STAT CARDS MINI ===== */
.stat-cards-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card-mini {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow);
}
.stat-card-mini-icon {
  width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-card-mini-icon.blue { background: rgba(41,128,185,0.1); color: var(--blue); }
.stat-card-mini-icon.gold { background: var(--gold-dim); color: var(--gold); }
.stat-card-mini-icon.green { background: rgba(39,174,96,0.1); color: var(--green); }
.stat-card-mini-icon.red { background: var(--primary-dim); color: var(--primary); }
.stat-card-mini-num { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.stat-card-mini-lbl { font-size: 0.73rem; color: var(--text3); font-weight: 500; margin-top: 1px; }

/* ===== TABLE LOADING ===== */
.table-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 40px; color: var(--text3); font-size: 0.88rem;
}
.spinner-sm {
  width: 20px; height: 20px; border: 2px solid var(--border);
  border-top-color: var(--primary); border-radius: 50; animation: spin 0.8s linear infinite; border-radius: 50%;
}

/* ===== HASIL TABLE ===== */
.hasil-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.hasil-table th {
  background: var(--bg4); color: var(--text2); font-size: 0.73rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 14px; text-align: left;
  border-bottom: 2px solid var(--border);
}
.th-center { text-align: center !important; }
.hasil-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.hasil-table tr:hover td { background: var(--bg4); }
.td-market { display: flex; align-items: center; gap: 8px; }
.td-num { text-align: center; }
.td-status { text-align: center; }
.td-action { text-align: center; }
.td-date { white-space: nowrap; color: var(--text2); font-size: 0.82rem; }
.td-period { color: var(--text3); font-size: 0.82rem; }
.mkt-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--text4);
}
.mkt-dot.live { background: var(--green2); box-shadow: 0 0 6px rgba(46,204,113,0.5); animation: pulse 1.5s ease-in-out infinite; }
.mkt-dot.closed { background: var(--text4); }
.mkt-dot.upcoming { background: var(--gold); }
.num-chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg4); border: 1px solid var(--border); border-radius: 5px;
  padding: 3px 8px; font-size: 0.9rem; font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em; color: var(--text);
}
.num-chip.gold { background: var(--gold-dim); border-color: rgba(230,126,34,0.35); color: var(--gold); }
.status-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 20px; font-size: 0.73rem; font-weight: 700;
  white-space: nowrap;
}
.status-live { background: rgba(39,174,96,0.12); color: var(--green); border: 1px solid rgba(39,174,96,0.25); }
.status-closed { background: rgba(160,174,192,0.15); color: var(--text3); border: 1px solid rgba(160,174,192,0.25); }
.status-upcoming { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(230,126,34,0.25); }
.detail-btn {
  padding: 4px 12px; border: 1px solid var(--border); background: #fff; border-radius: var(--r-sm);
  font-size: 0.78rem; font-weight: 600; color: var(--primary); cursor: pointer; transition: all 0.2s;
}
.detail-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.panel-count { font-size: 0.78rem; color: var(--text3); font-weight: 500; margin-left: auto; }

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; gap: 10px; color: var(--text4);
}
.empty-state svg { opacity: 0.4; }
.empty-state p { font-size: 1rem; font-weight: 600; color: var(--text2); }
.empty-state span { font-size: 0.83rem; }

/* ===== HASIL MOBILE CARDS ===== */
.hasil-cards { display: none; }
@media (max-width: 700px) {
  .hasil-cards { display: flex; flex-direction: column; gap: 10px; }
  #table-wrap { display: none !important; }
}
.hasil-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 14px; box-shadow: var(--shadow); cursor: pointer; transition: box-shadow 0.2s;
}
.hasil-card:hover { box-shadow: var(--shadow-md); }
.hasil-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hasil-card-market { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9rem; }
.hasil-card-meta { font-size: 0.75rem; color: var(--text3); }
.hasil-card-nums { display: flex; gap: 10px; }
.hasil-card-prize { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; }
.hcp-label { font-size: 0.68rem; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.03em; }
.hcp-num { font-size: 1.2rem; font-weight: 900; color: var(--text); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.hcp-num.gold-num { color: var(--gold); }

/* ===== STATISTICS TABS ===== */
.stat-tabs {
  display: flex; gap: 8px; margin-bottom: 16px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--r); padding: 6px;
  box-shadow: var(--shadow);
}
.stat-tab {
  flex: 1; padding: 8px 14px; border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--text2); font-size: 0.83rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.stat-tab:hover { background: var(--bg4); }
.stat-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.stat-panel { margin-bottom: 0; }

/* ===== FREQUENCY GRID ===== */
.freq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 16px; }
.freq-card {
  background: var(--bg4); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: box-shadow 0.2s;
}
.freq-card:hover { box-shadow: var(--shadow); }
.freq-card.hot { border-top: 3px solid var(--primary); }
.freq-card.cold { border-top: 3px solid var(--blue); }
.freq-rank { font-size: 0.65rem; font-weight: 700; color: var(--text4); text-transform: uppercase; letter-spacing: 0.05em; }
.freq-num { font-size: 1.4rem; font-weight: 900; color: var(--text); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.freq-bar-wrap { width: 100%; background: var(--border); border-radius: 3px; height: 5px; overflow: hidden; }
.freq-bar { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.freq-bar.hot { background: var(--primary); }
.freq-bar.cold { background: var(--blue); }
.freq-count { font-size: 0.75rem; font-weight: 700; color: var(--text2); }
.inline-bar-wrap { width: 120px; background: var(--border); border-radius: 3px; height: 6px; overflow: hidden; }
.inline-bar { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.5s; }

/* ===== DREAM BOOK ===== */
.dream-search-bar {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 2px solid var(--border); border-radius: var(--r); padding: 8px 12px;
  margin-bottom: 16px; box-shadow: var(--shadow); transition: border-color 0.2s;
}
.dream-search-bar:focus-within { border-color: var(--primary); }
.dream-search-bar svg { color: var(--text4); flex-shrink: 0; }
.dream-search-input { flex: 1; border: none; outline: none; font-size: 0.9rem; color: var(--text); background: transparent; }
.dream-search-btn {
  padding: 6px 16px; background: var(--primary); color: #fff; border: none;
  border-radius: var(--r-sm); font-size: 0.83rem; font-weight: 600; cursor: pointer; transition: background 0.2s; flex-shrink: 0;
}
.dream-search-btn:hover { background: var(--primary2); }
.dream-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.dream-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px; border-top: 3px solid var(--gold); transition: box-shadow 0.2s; cursor: default;
}
.dream-card:hover { box-shadow: var(--shadow-md); }
.dream-keyword { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: 6px; text-transform: capitalize; }
.dream-interp { font-size: 0.82rem; color: var(--text2); margin-bottom: 10px; line-height: 1.5; }
.dream-nums-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dream-num-chip {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: var(--bg4); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px;
}
.dnc-label { font-size: 0.62rem; font-weight: 700; color: var(--text4); text-transform: uppercase; letter-spacing: 0.04em; }
.dnc-num { font-size: 0.92rem; font-weight: 900; color: var(--text); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.dream-cat-badge {
  display: inline-block; padding: 2px 8px; background: var(--primary-dim); color: var(--primary);
  border-radius: 12px; font-size: 0.68rem; font-weight: 700;
}

/* ===== PRIMBON CATEGORY BUTTONS ===== */
.primbon-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.primbon-cat-btn {
  padding: 6px 16px; border: 1px solid var(--border); border-radius: 20px;
  background: #fff; color: var(--text2); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.primbon-cat-btn:hover { border-color: var(--primary); color: var(--primary); }
.primbon-cat-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== PRIMBON GRID ===== */
.primbon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 20px; }
.primbon-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 18px; cursor: pointer; transition: box-shadow 0.2s;
}
.primbon-card:hover { box-shadow: var(--shadow-md); }
.primbon-card-head { margin-bottom: 8px; }
.primbon-cat-tag {
  display: inline-block; padding: 2px 9px; background: var(--primary-dim); color: var(--primary);
  border-radius: 12px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.primbon-card-title { font-size: 0.95rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.primbon-card-preview { font-size: 0.82rem; color: var(--text2); line-height: 1.5; margin-bottom: 10px; }
.primbon-keywords { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.kw-tag {
  padding: 2px 8px; background: var(--bg4); border: 1px solid var(--border);
  border-radius: 4px; font-size: 0.7rem; color: var(--text3);
}
.primbon-card-footer { border-top: 1px solid var(--border); padding-top: 10px; }
.primbon-read-more { font-size: 0.78rem; font-weight: 600; color: var(--primary); }

/* ===== GENERATOR PAGE ===== */
.generator-page-wrap { display: flex; flex-direction: column; gap: 20px; }
.gen-cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gen-card {
  background: var(--primary);
  background-image: linear-gradient(180deg, #d44040 0%, #a93226 100%);
  border-radius: var(--r); border: 2px solid rgba(255,255,255,0.15);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 6px 24px rgba(192,57,43,0.35);
}
.gen-card-featured { border-color: var(--gold2); box-shadow: 0 6px 32px rgba(243,156,18,0.35); }
.gen-card-head { display: flex; justify-content: space-between; align-items: center; }
.gen-card-title { font-size: 1rem; font-weight: 800; color: #fff; }
.gen-badge {
  padding: 3px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 700;
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.2);
}
.gen-badge.gold { background: rgba(243,156,18,0.25); color: var(--gold2); border-color: rgba(243,156,18,0.4); }
.gen-display { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gen-slots-row { display: flex; gap: 6px; justify-content: center; }
.gen-slot {
  width: 44px; height: 52px; border-radius: 8px;
  background: rgba(255,255,255,0.12); border: 2px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 1.5rem; font-weight: 900; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-variant-numeric: tabular-nums;
}
.gen-slot.spinning { animation: genFlicker 0.1s linear infinite; }
.gen-slot.landed { background: rgba(255,255,255,0.25); transform: scale(1.08); }
@keyframes genFlicker {
  0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; }
}
.gen-result-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); font-weight: 600; letter-spacing: 0.08em; }
.gen-btn {
  width: 100%; padding: 10px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--r-sm); color: #fff; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 7px;
}
.gen-btn:hover { background: rgba(255,255,255,0.25); }
.gen-btn-gold { background: rgba(243,156,18,0.25); border-color: rgba(243,156,18,0.5); color: var(--gold2); }
.gen-btn-gold:hover { background: rgba(243,156,18,0.4); }
.gen-history { font-size: 0.78rem; color: rgba(255,255,255,0.6); }
.gen-hist-label { margin-bottom: 5px; }
.gen-hist-nums { display: flex; flex-wrap: wrap; gap: 5px; }
.gen-hist-num {
  padding: 2px 8px; background: rgba(255,255,255,0.1); border-radius: 4px;
  font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.7); font-variant-numeric: tabular-nums;
}
.gen-hist-num.latest { color: #fff; background: rgba(255,255,255,0.2); }

/* ===== BULK GENERATOR ===== */
.bulk-gen-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 14px; }
.bulk-result { margin-top: 4px; }
.bulk-nums-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.bulk-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 40px; background: var(--bg4); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: 0.95rem; font-weight: 900; font-variant-numeric: tabular-nums;
  color: var(--text); transition: all 0.2s;
}
.bulk-num:hover { background: var(--primary-dim); border-color: var(--primary); color: var(--primary); }

/* ===== GENERATOR INFO STEPS ===== */
.info-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.info-step { display: flex; align-items: flex-start; gap: 12px; }
.info-step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; flex-shrink: 0;
}
.info-step-text { font-size: 0.85rem; color: var(--text2); padding-top: 4px; line-height: 1.5; }
.info-disclaimer {
  padding: 10px 14px; background: var(--bg4); border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 0.78rem; color: var(--text3); line-height: 1.5;
}

/* ===== ARTICLE CARDS ===== */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }
.article-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; cursor: pointer; transition: box-shadow 0.2s, transform 0.2s;
}
.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.article-card-img {
  height: 160px; background: var(--bg2) center/cover no-repeat;
  position: relative;
}
.article-cat {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px; background: var(--primary); color: #fff; border-radius: 12px;
  font-size: 0.7rem; font-weight: 700;
}
.article-card-body { padding: 14px; }
.article-card-title { font-size: 0.9rem; font-weight: 800; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.article-card-excerpt { font-size: 0.8rem; color: var(--text2); line-height: 1.5; margin-bottom: 10px; }
.article-card-meta { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text4); }

/* ===== FEATURED ARTICLE ===== */
.featured-article { cursor: pointer; margin-bottom: 20px; border-radius: var(--r); overflow: hidden; }
.featured-article-img {
  height: 280px; background: var(--bg2) center/cover no-repeat;
  position: relative;
}
.featured-article-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 20%, rgba(0,0,0,0.75) 100%);
  padding: 20px; display: flex; flex-direction: column; justify-content: flex-end;
}
.featured-article-title { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 6px; line-height: 1.3; }
.featured-article-excerpt { font-size: 0.83rem; color: rgba(255,255,255,0.8); margin-bottom: 8px; }
.featured-article-meta { font-size: 0.75rem; color: rgba(255,255,255,0.6); }

/* ===== BLOG LAYOUT ===== */
.blog-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
.blog-sidebar { display: flex; flex-direction: column; gap: 16px; }
.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer; transition: background 0.2s;
  font-size: 0.85rem; color: var(--text2);
}
.cat-item:hover { background: var(--bg4); color: var(--primary); }
.cat-count {
  background: var(--primary-dim); color: var(--primary); border-radius: 12px;
  padding: 1px 8px; font-size: 0.72rem; font-weight: 700;
}
.recent-art-item { padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: color 0.2s; }
.recent-art-item:last-child { border-bottom: none; }
.recent-art-item:hover .recent-art-title { color: var(--primary); }
.recent-art-title { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 2px; line-height: 1.4; }
.recent-art-date { font-size: 0.72rem; color: var(--text4); }
@media (max-width: 900px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { display: none; }
}

/* ===== MODAL COMPONENTS ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-box {
  background: #fff; border-radius: var(--r); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: modalIn 0.2s ease;
}
.modal-box.modal-lg { max-width: 720px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1rem; font-weight: 800; color: var(--text); }
.modal-sub { font-size: 0.78rem; color: var(--text3); margin-top: 2px; }
.modal-close {
  background: none; border: none; cursor: pointer; color: var(--text3);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: background 0.2s; flex-shrink: 0;
}
.modal-close:hover { background: var(--bg4); color: var(--text); }
.modal-body { padding: 18px 20px; }
.modal-prizes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.modal-prize-item {
  background: var(--bg4); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 12px; text-align: center;
}
.modal-prize-item.gold { background: var(--gold-dim); border-color: rgba(230,126,34,0.35); }
.modal-prize-label { font-size: 0.7rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.modal-prize-num { font-size: 1.3rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: 0.08em; color: var(--text); }
.modal-prize-item.gold .modal-prize-num { color: var(--gold); }
.modal-section-title { font-size: 0.78rem; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; margin: 12px 0 8px; }
.modal-extra-nums { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.modal-meta-row { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 12px; }
.modal-meta-item { font-size: 0.8rem; color: var(--text2); }
.article-content { font-size: 0.9rem; line-height: 1.7; color: var(--text2); }
.article-content p { margin-bottom: 12px; }
.article-content h2, .article-content h3 { color: var(--text); font-weight: 700; margin: 16px 0 8px; }

/* ===== PAGE DOTS / PAGINATION ===== */
.pg-dots { display: flex; align-items: center; padding: 0 4px; color: var(--text4); font-size: 0.9rem; }

/* ===== SETTINGS FORM ===== */
.settings-section { margin-bottom: 20px; }
.settings-section-title {
  font-size: 0.75rem; font-weight: 700; color: var(--text3); text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.settings-msg {
  padding: 10px 14px; border-radius: var(--r-sm); font-size: 0.85rem; font-weight: 600; margin-top: 10px; display: none;
}
.settings-msg.success { background: rgba(39,174,96,0.1); color: var(--green); border: 1px solid rgba(39,174,96,0.25); display: block; }
.settings-msg.error { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(192,57,43,0.25); display: block; }

/* ===== FOOTER IMPROVEMENTS ===== */
.ftr-inner { max-width: 1200px; margin: 0 auto; padding: 32px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.ftr-brand { display: flex; flex-direction: column; gap: 10px; }
.ftr-logo { height: 48px; width: auto; }
.ftr-desc { font-size: 0.82rem; color: rgba(255,255,255,0.55); line-height: 1.6; max-width: 300px; }
.ftr-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.ftr-col { display: flex; flex-direction: column; gap: 6px; }
.ftr-col-title { font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.ftr-link { font-size: 0.82rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.ftr-link:hover, .ftr-link.active { color: #fff; }
.ftr-bottom {
  background: rgba(0,0,0,0.2); padding: 12px 16px; text-align: center;
  font-size: 0.75rem; color: rgba(255,255,255,0.4);
}

@media (max-width: 640px) {
  .ftr-inner { grid-template-columns: 1fr; }
  .ftr-links { grid-template-columns: repeat(2, 1fr); }
  .gen-cards-row { grid-template-columns: 1fr; }
  .stat-cards-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stat-cards-row { grid-template-columns: 1fr 1fr; }
  .modal-prizes-grid { grid-template-columns: 1fr 1fr 1fr; }
  .gen-cards-row { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .blog-layout { grid-template-columns: 1fr; }
  .primbon-grid { grid-template-columns: 1fr; }
}
