/* ============================================================
   ANGKALAB — Shared CSS
   Design: Modern Data Dashboard, Dark Theme
   ============================================================ */

/* === VARIABLES === */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #151d2e;
  --bg-card-hover: #1a2540;
  --bg-input: #0d1321;
  --bg-elevated: #1e2a3e;

  --accent: #00d4aa;
  --accent-light: #00f5d4;
  --accent-dim: rgba(0,212,170,0.12);
  --accent-glow: rgba(0,212,170,0.25);

  --hot: #ff4757;
  --cold: #3b82f6;
  --warm: #f59e0b;
  --green: #10b981;

  --text-primary: #e8edf5;
  --text-secondary: #8b95a8;
  --text-muted: #4e5a6e;
  --text-link: #00d4aa;

  --border: #1c2638;
  --border-light: #253040;
  --border-accent: rgba(0,212,170,0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 30px var(--accent-glow);

  --container: 1140px;
  --header-h: 60px;
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text-link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* === NOISE TEXTURE OVERLAY === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* === CONTAINER === */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: rgba(10,14,23,0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  letter-spacing: -0.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.logo .suffix {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 1rem;
}

/* Navigation */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #00f5d4 50%, #7bf1a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   SECTION LABELS
   ============================================================ */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-heading {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.section-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 28px;
  max-width: 600px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s;
}
.card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}
.card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================================
   TOOLS GRID (homepage)
   ============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  color: inherit;
}
.tool-icon {
  font-size: 2rem;
  line-height: 1;
}
.tool-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
.tool-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.tool-tag {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: fit-content;
}

/* ============================================================
   ARTIKEL GRID (homepage)
   ============================================================ */
.artikel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.artikel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.artikel-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  color: inherit;
}
.artikel-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.artikel-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   HASIL TERBARU (homepage snippet + /hasil/ page)
   ============================================================ */
.hasil-strip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
}
.hasil-strip-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  white-space: nowrap;
}
.hasil-items {
  display: flex;
  gap: 16px;
  overflow-x: auto;
}
.hasil-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.hasil-market {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.hasil-number {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-light);
}
.hasil-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
}

/* Full hasil table (/hasil/ page) */
.hasil-table {
  width: 100%;
  border-collapse: collapse;
}
.hasil-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.hasil-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.hasil-table tr:hover td {
  background: var(--bg-card-hover);
}
.hasil-table .number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-light);
}
.hasil-table .date {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ============================================================
   TOOLS PAGE — UI COMPONENTS
   ============================================================ */

/* Market selector grid */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 28px;
}
.market-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.market-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.market-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* Method pills */
.method-row {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.method-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 18px;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.method-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.method-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-primary);
}

/* Position tabs */
.pos-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}
.pos-tab {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-family: var(--font-display);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.pos-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* Primary action button */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 36px;
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.btn-primary:active {
  transform: translateY(0);
}

/* Heatmap */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}
.heat-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: default;
  transition: transform 0.15s;
  position: relative;
}
.heat-cell:hover {
  transform: scale(1.15);
  z-index: 2;
}

/* Prediction output */
.prediction-box {
  background: linear-gradient(135deg, rgba(0,212,170,0.06), rgba(0,245,212,0.02));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
}
.pred-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 20px;
}
.pred-numbers {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.pred-set {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--text-primary);
  transition: all 0.3s;
}
.pred-set:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.pred-method {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}
.disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

/* Hot/Cold bars */
.hc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.hc-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  width: 24px;
  text-align: center;
}
.hc-bar-bg {
  flex: 1;
  height: 22px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}
.hc-bar {
  height: 100%;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  transition: width 0.6s ease-out;
}

/* Streak / data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.data-table tr:hover td {
  background: var(--bg-card-hover);
}

/* Loading spinner */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 50px 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Results grid */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.results-grid .full-width {
  grid-column: 1 / -1;
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.article-breadcrumb {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.article-breadcrumb a {
  color: var(--text-secondary);
}
.article-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.article-body {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
}
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 36px 0 14px;
  letter-spacing: -0.3px;
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 10px;
}
.article-body p {
  margin-bottom: 16px;
}
.article-body strong {
  color: var(--text-primary);
  font-weight: 600;
}
.article-body ul, .article-body ol {
  margin: 12px 0 16px 20px;
}
.article-body li {
  margin-bottom: 6px;
  list-style: disc;
  color: var(--text-secondary);
}
.article-body ol li {
  list-style: decimal;
}

/* CTA box inside article */
.article-cta {
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
}
.article-cta-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.article-cta-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.article-cta a {
  font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}
.footer-links a {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-copy {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.footer-disclaimer {
  font-size: 0.68rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 12px auto 0;
  line-height: 1.5;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden { display: none !important; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-hot { color: var(--hot); }
.text-cold { color: var(--cold); }
.text-warm { color: var(--warm); }
.font-mono { font-family: var(--font-mono); }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero-title { font-size: 1.8rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .artikel-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: repeat(3, 1fr); }
  .pred-set { font-size: 1.4rem; padding: 10px 14px; letter-spacing: 4px; }
  .heatmap-grid { gap: 3px; }
  .heat-cell { font-size: 0.7rem; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 16px; z-index: 99; }
  .menu-toggle { display: block; }
  .method-btn { padding: 6px 12px; font-size: 0.72rem; }
  .article-title { font-size: 1.5rem; }
  .hero { padding: 36px 0 28px; }
  .hasil-strip { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
  .market-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 16px; }
  .hero-title { font-size: 1.5rem; }
  .pred-numbers { gap: 8px; }
  .pred-set { font-size: 1.1rem; letter-spacing: 3px; padding: 8px 12px; }
  .tool-card { padding: 20px 18px; }
}
