:root {
  --d88-gold: #c9a24b;
  --d88-gold-2: #e8d090;
  --d88-gold-3: #a67c2a;
  --d88-black: #0c0b09;
  --d88-panel: #16130e;
  --d88-panel-2: #1e1a14;
  --d88-line: rgba(212, 175, 55, 0.38);
  --d88-cream: #f3ead0;
  --d88-muted: #cbb98a;
  --d88-live: #e23d3d;
}

#d88-extras {
  width: 100%;
  margin: 8px 0 4px;
}

.d88-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.d88-panel {
  margin: 0 0 16px;
  padding: 18px 18px 16px;
  border: 1px solid var(--d88-line);
  border-radius: 18px;
  background:
    radial-gradient(1200px 180px at 8% -20%, rgba(212, 175, 55, 0.16), transparent 55%),
    linear-gradient(180deg, var(--d88-panel-2) 0%, var(--d88-panel) 100%);
  color: var(--d88-cream);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.d88-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--d88-gold-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.d88-title {
  margin: 0 0 14px;
  color: var(--d88-gold-2);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.d88-prose .d88-title,
.d88-prose h2 {
  color: var(--d88-gold-2);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  font-size: 20px;
  line-height: 1.35;
}

.d88-prose p {
  margin: 0 0 12px;
  color: var(--d88-cream);
  font-size: 15px;
  line-height: 1.75;
  min-height: 3.5em;
}

.d88-prose p a {
  color: var(--d88-gold-2);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.d88-prose p a:hover,
.d88-prose p a:focus {
  color: #fff;
}

.d88-prose p:last-child {
  margin-bottom: 0;
}

.d88-matches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.d88-match {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 168px;
  padding: 14px 14px 12px;
  border: 1px solid var(--d88-line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(12, 11, 9, 0.55), rgba(12, 11, 9, 0.2));
}

.d88-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.d88-league {
  color: var(--d88-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.d88-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--d88-gold-2);
  font-size: 11px;
  font-weight: 700;
}

.d88-status.is-live {
  background: rgba(226, 61, 61, 0.16);
  color: #ffd0d0;
}

.d88-status.is-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--d88-live);
  box-shadow: 0 0 0 0 rgba(226, 61, 61, 0.7);
  animation: d88-pulse 1.4s infinite;
}

.d88-status.is-ft {
  background: rgba(240, 215, 140, 0.18);
  color: var(--d88-cream);
}

@keyframes d88-pulse {
  70% { box-shadow: 0 0 0 8px rgba(226, 61, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 61, 61, 0); }
}

.d88-match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.d88-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.d88-team.home { justify-content: flex-start; }
.d88-team.away { justify-content: flex-end; }

.d88-crest {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 42px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.d88-team-name {
  color: var(--d88-cream);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.d88-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 84px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--d88-gold-2);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.d88-score .sep {
  color: var(--d88-muted);
  font-weight: 600;
}

.d88-venue {
  color: var(--d88-muted);
  font-size: 12px;
}

.d88-match-empty {
  grid-column: 1 / -1;
  padding: 28px 12px;
  color: var(--d88-muted);
  text-align: center;
}

.d88-faq-list,
.d88-review-grid {
  display: grid;
  gap: 10px;
}

.d88-review-grid {
  grid-template-columns: 1fr 1fr;
}

.d88-faq-item {
  overflow: hidden;
  border: 1px solid var(--d88-line);
  border-radius: 14px;
  background: rgba(12, 11, 9, 0.35);
}

.d88-faq-item[open] {
  background: rgba(212, 175, 55, 0.08);
}

.d88-faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--d88-gold-2);
  font-size: 15px;
  font-weight: 700;
}

.d88-faq-item summary::-webkit-details-marker { display: none; }

.d88-faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--d88-gold);
  font-size: 18px;
  line-height: 1;
}

.d88-faq-item[open] summary::after { content: "–"; }

.d88-faq-item p {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--d88-cream);
  font-size: 14px;
  line-height: 1.7;
}

.d88-review {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--d88-line);
  border-radius: 14px;
  background: rgba(12, 11, 9, 0.35);
}

.d88-review-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.d88-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, var(--d88-gold-2), var(--d88-gold-3));
  color: var(--d88-black);
  font-size: 12px;
  font-weight: 800;
}

.d88-nick {
  color: var(--d88-gold-2);
  font-size: 14px;
  font-weight: 800;
}

.d88-stars {
  color: var(--d88-gold);
  letter-spacing: 1px;
  font-size: 12px;
}

.d88-review p {
  margin: 0;
  color: var(--d88-cream);
  font-size: 13.5px;
  line-height: 1.65;
}

.shadow-inner.bg-white {
  background: linear-gradient(180deg, #1a1610 0%, #0e0c0a 100%) !important;
  color: var(--d88-cream);
}

.shadow-inner.bg-white a,
.shadow-inner.bg-white div,
.shadow-inner.bg-white span {
  color: inherit;
}

.d88-ft-bar {
  width: 100%;
  margin-top: 8px;
  padding: 16px 4px 28px;
  border-top: 1px solid var(--d88-line);
}

.d88-ft-casino {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.d88-ft-casino a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--d88-line);
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--d88-gold-2) !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.d88-ft-casino a:hover,
.d88-ft-casino a:focus {
  background: rgba(212, 175, 55, 0.22);
}

.d88-lang {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ft-region,
.ft-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--d88-line);
  border-radius: 12px;
  background: rgba(12, 11, 9, 0.45);
  color: var(--d88-cream);
  cursor: pointer;
  user-select: none;
}

.ft-switch { flex: 1 1 220px; }

.ft-flag {
  width: 22px;
  height: 15px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
  flex: 0 0 22px;
}

.ft-flag-id {
  background: linear-gradient(to bottom, #e70011 50%, #fff 50%);
}

.ft-flag-en {
  background:
    linear-gradient(#c8102e 0 0) 50% / 100% 28% no-repeat,
    linear-gradient(#c8102e 0 0) 50% / 24% 100% no-repeat,
    #fff;
}

.ft-flag-zh {
  background: #de2910;
  position: relative;
}

.ft-flag-zh::after {
  content: "★";
  position: absolute;
  left: 3px;
  top: -1px;
  color: #ffde00;
  font-size: 9px;
}

.ft-flag-jv {
  background: linear-gradient(to bottom, #c9a24b 50%, #7a1f1f 50%);
}

.ft-flag-su {
  background: linear-gradient(to bottom, #1b7a3d 50%, #e8c547 50%);
}

.ft-lang-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  padding: 8px;
  border: 1px solid var(--d88-line);
  border-radius: 14px;
  background: #14110c;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.d88-lang.is-open .ft-lang-menu { display: grid; gap: 6px; }

.ft-lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--d88-cream);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.ft-lang-menu button:hover,
.ft-lang-menu button.is-active {
  background: rgba(212, 175, 55, 0.16);
  color: var(--d88-gold-2);
}

#navbar-layout a[data-d88-nav],
#navbar-layout [data-d88-nav] {
  white-space: nowrap;
}

.d88-mobile-tabs {
  display: none;
}

.d88-tab {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
  font-size: 9px;
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
  white-space: normal;
}

.d88-tab-ico,
.d88-side-ico {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  color: #c9a24b;
}

.d88-side-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.d88-rtp {
  width: 100%;
  margin: 0 0 16px;
  padding: 22px 18px 16px;
  border-radius: 14px;
  background:
    radial-gradient(90% 80% at 50% 0%, rgba(160, 28, 36, 0.45), transparent 70%),
    linear-gradient(180deg, #5c141c 0%, #3a0c12 48%, #24080c 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.d88-rtp-title {
  margin: 0 0 10px;
  color: #fff;
  font-family: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.d88-rtp-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.d88-rtp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2b2b;
  box-shadow: 0 0 0 0 rgba(255, 43, 43, 0.7);
  animation: d88-rtp-pulse 1.4s ease-out infinite;
}

@keyframes d88-rtp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 43, 43, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(255, 43, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 43, 43, 0); }
}

.d88-rtp-time {
  margin: 0 0 16px;
  color: #e8c547;
  font-size: 13px;
  font-weight: 600;
}

.d88-rtp-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.d88-rtp-card {
  min-width: 0;
  padding: 12px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(12, 8, 10, 0.72);
}

.d88-rtp-card.is-today {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff, 0 0 14px rgba(255, 255, 255, 0.55);
}

.d88-rtp-day {
  margin: 0 0 8px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.d88-rtp-pct {
  margin: 0 0 10px;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.d88-rtp-bar {
  width: 100%;
  height: 7px;
  margin: 0 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #4a4a4a;
}

.d88-rtp-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3b3b 0%, #b10f16 100%);
  transition: width 0.45s ease;
}

.d88-rtp-label {
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
}

@media (max-width: 767px) {
  .d88-wrap { padding: 0 16px; }
  .d88-matches-grid,
  .d88-review-grid { grid-template-columns: 1fr; }
  .d88-title { font-size: 20px; }
  .d88-team-name { font-size: 13px; }
  .d88-crest { width: 36px; height: 36px; flex-basis: 36px; }
  .d88-score { min-width: 72px; font-size: 18px; }
  .ft-region,
  .ft-switch { width: 100%; }
  .d88-ft-bar { padding-bottom: 96px; }
  .d88-tab-ico { width: 22px; height: 22px; }
  .d88-mobile-tabs {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    height: 64px;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: #11100c;
    border-top: 1px solid var(--d88-line);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
    color: var(--d88-gold-2);
  }
  .d88-mobile-tabs .d88-tab { color: var(--d88-gold-2); }
  div.fixed.bottom-0.left-0.right-0.z-50 { display: none !important; }
  body { padding-bottom: 64px; }
  .d88-rtp { padding: 18px 12px 14px; }
  .d88-rtp-title { font-size: 22px; }
  .d88-rtp-pct { font-size: 18px; }
  .d88-rtp-day { font-size: 10px; }
  .d88-rtp-label { font-size: 9px; }
  .d88-rtp-grid { gap: 6px; }
}

a.d88-cta,
a.d88-cta:visited,
a.d88-cta:hover,
a.d88-cta:focus {
  color: inherit;
  text-decoration: none;
}
