/*
Theme Name: Daily Sydney Today
Theme URI: https://dailysydneytoday.com/
Author: Daily Sydney Today
Description: Tema single page dengan angka acak harian berputar (hiburan, bukan hasil resmi). Angka berganti otomatis setiap hari dan sama untuk semua pengunjung.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: daily-sydney-today
*/

:root {
  --bg: #020c16;
  --bg-2: #061a2c;
  --panel: #0a2a45;
  --panel-2: #0d3352;
  --line: rgba(125, 255, 212, 0.22);
  --line-strong: rgba(125, 255, 212, 0.55);
  --mint: #7dffd4;
  --mint-2: #14d39a;
  --gold: #ffcf5c;
  --gold-soft: #ffe8b0;
  --text: #e6f3ff;
  --muted: #8fb0c8;
  --radius: 18px;
  --font-head: "Chakra Petch", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-digit: "Orbitron", "Chakra Petch", monospace;
  --wrap: 1240px;
  --side: 290px;
  --gap: 32px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(20, 80, 122, 0.55), transparent 70%),
    radial-gradient(800px 500px at 100% 40%, rgba(20, 211, 154, 0.07), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--gold-soft); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--mint); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(2, 12, 22, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand img { height: 60px; width: auto; }
.brand .custom-logo { height: 60px; width: auto; }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--line-strong); color: var(--mint);
  border-radius: 10px; width: 44px; height: 44px; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; border-radius: 2px;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: 0.02em;
  color: var(--text);
}
.main-nav a:hover, .main-nav a.is-active { background: rgba(125, 255, 212, 0.1); color: var(--mint); }

/* ---------- Hero / Machine ---------- */
.hero { position: relative; padding: 48px 0 72px; overflow: hidden; }
.hero-floor {
  position: absolute; left: -50%; right: -50%; bottom: -10px; height: 46%;
  background-image:
    linear-gradient(rgba(125, 255, 212, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 255, 212, 0.35) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  animation: floor-move 3s linear infinite;
  pointer-events: none;
  opacity: 0.55;
}
@keyframes floor-move { from { background-position: 0 0; } to { background-position: 0 60px; } }

.hero-head { text-align: center; position: relative; margin-bottom: 28px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid rgba(255, 207, 92, 0.45); border-radius: 999px; padding: 6px 14px;
  background: rgba(255, 207, 92, 0.06);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.hero-title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(30px, 5.4vw, 54px); line-height: 1.1; margin: 16px 0 8px;
  background: linear-gradient(180deg, #f0fff9 0%, var(--mint) 55%, var(--mint-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(125, 255, 212, 0.25);
}
.hero-date { font-family: var(--font-head); font-size: 18px; color: var(--muted); margin: 0; }
.hero-date strong { color: var(--text); font-weight: 600; }

.machine {
  position: relative; max-width: 760px; margin: 0 auto;
  padding: 28px 28px 30px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(13, 51, 82, 0.92), rgba(4, 20, 34, 0.95));
  border: 2px solid var(--mint);
  box-shadow: 0 0 0 6px rgba(125, 255, 212, 0.08), 0 0 40px rgba(125, 255, 212, 0.28), inset 0 0 40px rgba(125, 255, 212, 0.08);
}

.ticker {
  position: relative; overflow: hidden;
  border: 2px solid rgba(255, 207, 92, 0.7); border-radius: 12px;
  background: #01070d;
  height: 54px; margin-bottom: 26px;
}
.ticker-track {
  position: absolute; top: 0; left: 0; height: 100%;
  display: flex; align-items: center; white-space: nowrap;
  font-family: var(--font-digit); font-weight: 800; font-size: 24px; letter-spacing: 0.18em;
  color: var(--mint); text-shadow: 0 0 8px rgba(125, 255, 212, 0.8);
  animation: ticker 22s linear infinite;
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 62%);
  mask-image: radial-gradient(circle, #000 52%, transparent 62%);
  -webkit-mask-size: 4px 4px; mask-size: 4px 4px;
}
.ticker-track span { padding-right: 2em; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.reels { display: flex; justify-content: center; gap: clamp(8px, 2vw, 16px); container-type: inline-size; --n: 4; }
.reel {
  position: relative;
  width: clamp(58px, 13vw, 110px);
  width: min(110px, calc((100cqw - (var(--n) - 1) * 14px) / var(--n)));
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: linear-gradient(180deg, #03111d, #062035 50%, #03111d);
  border: 2px solid var(--line-strong);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.8), 0 0 18px rgba(125, 255, 212, 0.15);
  overflow: hidden;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
.reel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(1, 7, 13, 0.85) 0%, transparent 28%, transparent 72%, rgba(1, 7, 13, 0.85) 100%);
}
.reel-window {
  position: absolute; inset: 0;
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 65%);
  mask-image: radial-gradient(circle, #000 55%, transparent 65%);
  -webkit-mask-size: 5px 5px; mask-size: 5px 5px;
}
.reel-strip { position: absolute; left: 0; right: 0; top: 0; height: 100%; display: flex; flex-direction: column; will-change: transform; }
.reel-strip span {
  flex: 0 0 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-digit); font-weight: 900;
  font-size: clamp(40px, 9vw, 78px);
  font-size: min(78px, calc((100cqw - (var(--n) - 1) * 14px) / var(--n) * 0.7));
  color: var(--mint);
  text-shadow: 0 0 12px rgba(125, 255, 212, 0.9);
}
.reel.is-spinning .reel-strip { filter: blur(1.2px); }
.reel.is-landed { border-color: var(--gold); box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.8), 0 0 26px rgba(255, 207, 92, 0.55); animation: landed 0.6s ease; }
@keyframes landed { 40% { transform: scale(1.06); } }

.machine-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line);
}
.countdown { font-family: var(--font-head); color: var(--muted); font-size: 15px; }
.countdown strong { display: block; font-family: var(--font-digit); color: var(--gold-soft); font-size: 22px; letter-spacing: 0.08em; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: 0.04em;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 0; color: #02231a;
  background: linear-gradient(180deg, #b6ffe8, var(--mint) 45%, var(--mint-2));
  box-shadow: 0 6px 22px rgba(20, 211, 154, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(20, 211, 154, 0.45); color: #02231a; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn:focus-visible, .main-nav a:focus-visible, .nav-toggle:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.disclaimer-chip {
  margin: 18px auto 0; max-width: 760px; text-align: center;
  font-size: 13px; color: var(--muted);
}
.disclaimer-chip b { color: var(--gold-soft); font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; position: relative; }
.section + .section { border-top: 1px solid rgba(125, 255, 212, 0.08); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.section-head h2 {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.2; margin: 0 0 8px;
  color: var(--text);
}
.section-head h2 em { font-style: normal; color: var(--mint); }
.section-head p { margin: 0; color: var(--muted); }

.card {
  background: linear-gradient(160deg, rgba(13, 51, 82, 0.7), rgba(6, 26, 44, 0.8));
  border: 1px solid var(--line); border-radius: var(--radius);
}

/* History table */
.history { overflow-x: auto; }
.history table { width: 100%; border-collapse: collapse; min-width: 420px; }
.history th, .history td { padding: 14px 18px; text-align: left; border-bottom: 1px solid rgba(125, 255, 212, 0.1); }
.history th { font-family: var(--font-head); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.history td { font-size: 15px; }
.history tr:last-child td { border-bottom: 0; }
.history .num { font-family: var(--font-digit); font-weight: 800; font-size: 20px; letter-spacing: 0.22em; color: var(--mint); }
.history tr.is-today td { background: rgba(125, 255, 212, 0.07); }
.history tr.is-today .num { color: var(--gold); text-shadow: 0 0 10px rgba(255, 207, 92, 0.5); }
.tag-today { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: #2a1c00; vertical-align: middle; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.feature { padding: 24px; }
.feature .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: rgba(125, 255, 212, 0.1); color: var(--mint); border: 1px solid var(--line-strong);
}
.feature h3 { font-family: var(--font-head); font-size: 20px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* About */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.about-media { padding: 10px; border-radius: 22px; }
.about-media img { border-radius: 14px; width: 100%; }
.about h2 { font-family: var(--font-head); font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; margin: 0 0 12px; }
.about p { color: var(--muted); margin: 0 0 12px; }

/* FAQ */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { padding: 0; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  font-family: var(--font-head); font-weight: 600; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--mint); transition: transform 0.2s ease; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 18px; color: var(--muted); }

/* Generic content (other pages) */
.content-card { padding: 32px; margin: 48px auto; max-width: 860px; }
.content-card h1 { font-family: var(--font-head); font-size: clamp(28px, 4vw, 40px); margin-top: 0; }
.content-card a { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(1, 7, 13, 0.7); padding: 44px 0 28px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; }
.footer-grid img { width: 160px; }
.age-note { display: flex; gap: 14px; align-items: flex-start; }
.age-badge {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; color: var(--gold); border: 2px solid var(--gold);
}
.age-note p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(125, 255, 212, 0.08); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }


/* ---------- Layout with sidebar ---------- */
.layout {
  width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 28px 16px 0;
  display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: var(--gap); align-items: start;
}
.layout--left .sidebar { grid-column: 1; grid-row: 1; }
.layout--left .layout-main { grid-column: 2; grid-row: 1; }
.layout--right { grid-template-columns: minmax(0, 1fr) var(--side); }
.layout--right .layout-main { grid-column: 1; grid-row: 1; }
.layout--right .sidebar { grid-column: 2; grid-row: 1; }
.layout--none { display: block; max-width: none; padding: 0; }

.layout:not(.layout--none) .layout-main .wrap { max-width: none; padding: 0; }
.layout:not(.layout--none) .hero {
  padding: 40px 24px 52px;
  border: 1px solid var(--line); border-radius: 24px;
  background: radial-gradient(700px 360px at 50% 0%, rgba(20, 80, 122, 0.55), transparent 75%), rgba(4, 20, 34, 0.55);
}
.layout:not(.layout--none) .section { padding: 56px 0; }
.layout:not(.layout--none) .content-card { margin: 0 0 24px; }
.layout:not(.layout--none) .about { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Sidebar */
.sidebar { display: grid; gap: 18px; min-width: 0; }
.widget { padding: 20px; min-width: 0; }
.widget-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-soft); margin: 0 0 14px;
}
.widget-title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--mint); box-shadow: 0 0 8px var(--mint); }

.mini-digits { display: flex; gap: 8px; }
.mini-digits span {
  flex: 1 1 0; max-width: 56px; aspect-ratio: 3 / 4; display: grid; place-items: center;
  font-family: var(--font-digit); font-weight: 900; font-size: 28px; color: var(--mint);
  text-shadow: 0 0 10px rgba(125, 255, 212, 0.8);
  background: #03111d; border: 1.5px solid var(--line-strong); border-radius: 10px;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.mini-digits.is-hidden span { color: var(--muted); text-shadow: none; border-color: var(--line); }
.mini-date { margin: 12px 0 8px; color: var(--muted); font-size: 14px; }
.widget-link { font-weight: 600; font-size: 14px; }

.widget .schedule, .widget .mini-history, .widget .side-menu { list-style: none; margin: 0; padding: 0; }
.widget .schedule li, .widget .mini-history li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
}
.widget .schedule li:last-child, .widget .mini-history li:last-child { border-bottom: 0; }
.widget .schedule span, .widget .mini-history span { color: var(--muted); }
.widget .schedule strong { font-family: var(--font-digit); color: var(--gold-soft); font-size: 15px; letter-spacing: 0.06em; }
.widget .mini-history small { color: var(--muted); opacity: 0.75; margin-left: 4px; }
.widget .mini-history .num { font-family: var(--font-digit); font-weight: 800; color: var(--mint); letter-spacing: 0.16em; font-size: 15px; }
.widget .mini-history li.is-today span { color: var(--text); font-weight: 600; }
.widget .mini-history li.is-today .num { color: var(--gold); }
.widget .side-menu a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--text); font-weight: 500; font-size: 15px; }
.widget .side-menu a:hover { background: rgba(125, 255, 212, 0.1); color: var(--mint); }

.widget-note { display: flex; gap: 12px; align-items: flex-start; }
.widget-note .age-badge { width: 40px; height: 40px; font-size: 13px; }
.widget-note p { margin: 0; color: var(--muted); font-size: 13px; }

/* Widgets added from Appearance > Widgets */
.widget:not(.dst-box) { color: var(--muted); font-size: 14px; }
.widget:not(.dst-box) h2, .widget:not(.dst-box) h3 { font-family: var(--font-head); color: var(--gold-soft); font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px; }
.widget:not(.dst-box) ul { margin: 0; padding-left: 18px; }
.widget:not(.dst-box) li { margin: 6px 0; }
.widget:not(.dst-box) p:last-child { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .layout, .layout--right { grid-template-columns: minmax(0, 1fr); }
  .layout--left .sidebar, .layout--left .layout-main,
  .layout--right .sidebar, .layout--right .layout-main { grid-column: auto; grid-row: auto; }
  .sidebar { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 8px; }
}

@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; justify-items: start; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(2, 12, 22, 0.97); border-bottom: 1px solid var(--line);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px 16px 16px; }
  .main-nav a { padding: 12px 14px; border-radius: 10px; }
  .brand img, .brand .custom-logo { height: 44px; }
  .hero { padding: 32px 0 48px; }
  .layout { padding-top: 16px; }
  .layout:not(.layout--none) .hero { padding: 28px 12px 36px; border-radius: 20px; }
  .layout:not(.layout--none) .section { padding: 44px 0; }
  .machine { padding: 18px 14px 20px; border-radius: 22px; }
  .ticker { height: 44px; margin-bottom: 18px; }
  .ticker-track { font-size: 18px; }
  .machine-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .btn { justify-content: center; }
  .section { padding: 48px 0; }
  .history table { min-width: 0; }
  .history th, .history td { padding: 12px 10px; font-size: 14px; }
  .history th { font-size: 11px; letter-spacing: 0.08em; }
  .history .num { font-size: 17px; letter-spacing: 0.14em; }
  .tag-today { display: block; width: max-content; margin: 4px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-floor, .ticker-track, .eyebrow .dot { animation: none; }
  .reel.is-landed { animation: none; }
}
