/* GELANGGANG — Digital Scoring Pencak Silat — gaya bersama */

:root {
  --ink: #0b0d12;
  --surface: #12151d;
  --surface-2: #171b26;
  --line: #232838;
  --gold: #e0a92f;
  --gold-soft: #f2c969;
  --blue-corner: #2e6bff;
  --red-corner: #e5484d;
  --paper: #f5f1e8;
}

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--ink);
  color: #e8eaf1;
}

.font-display { font-family: 'Barlow Condensed', 'Plus Jakarta Sans', sans-serif; }

/* Tekstur halus ala kanvas gelanggang */
.bg-arena {
  background-color: var(--ink);
  background-image:
    radial-gradient(1200px 500px at 50% -10%, rgba(224, 169, 47, 0.07), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 8px);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 10px; font-weight: 600; transition: transform .06s ease, filter .15s ease, background .15s ease;
  cursor: pointer; user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-gold { background: var(--gold); color: #1a1405; }
.btn-gold:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: #c9cede; }
.btn-ghost:hover { background: rgba(255, 255, 255, .04); }
.btn-danger { background: #3a1518; border: 1px solid #6e2a2e; color: #ff9d9f; }
.btn-danger:hover { background: #4a1b1f; }

.input {
  width: 100%; background: #0e1119; border: 1px solid var(--line); color: #e8eaf1;
  border-radius: 10px; padding: .6rem .8rem; outline: none;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 169, 47, .15); }

.label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #8b93a9; font-weight: 700; }

/* Halaman dokumentasi */
.doc-copy { color: #aeb5c7; line-height: 1.8; }
.doc-copy h2 {
  font-family: 'Barlow Condensed', 'Plus Jakarta Sans', sans-serif;
  color: #f2f3f7; font-size: 1.8rem; font-weight: 700; letter-spacing: -.01em;
  margin: 0 0 .75rem; scroll-margin-top: 6rem;
}
.doc-copy h3 { color: #e8eaf1; font-size: 1rem; font-weight: 700; margin: 1.25rem 0 .4rem; }
.doc-copy p + p { margin-top: .7rem; }
.doc-copy ul, .doc-copy ol { margin: .75rem 0 0 1.15rem; }
.doc-copy ul { list-style: disc; }
.doc-copy ol { list-style: decimal; }
.doc-copy li { padding-left: .25rem; margin: .35rem 0; }
.doc-copy strong { color: #e8eaf1; }
.doc-copy code { color: var(--gold-soft); background: rgba(224, 169, 47, .08); padding: .1rem .35rem; border-radius: .3rem; }
.doc-link { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }
.doc-link:hover { color: #fff; }
.doc-section { padding: 1.5rem; }
.doc-step {
  width: 1.8rem; height: 1.8rem; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 9999px; background: rgba(224, 169, 47, .14); color: var(--gold-soft);
  font-size: .75rem; font-weight: 800;
}
.doc-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.doc-table th { color: #8b93a9; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; text-align: left; }
.doc-table th, .doc-table td { padding: .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table td { color: #b8bfd0; }
.doc-callout { border-left: 3px solid var(--gold); background: rgba(224, 169, 47, .07); border-radius: 0 10px 10px 0; }

/* Angka skor dengan tabular figures agar tidak goyang */
.score-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-variant-numeric: tabular-nums;
  line-height: .85;
  letter-spacing: -0.01em;
}

/* Indikator denyut untuk status live */
.pulse-dot { position: relative; }
.pulse-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 9999px;
  background: currentColor; opacity: .5; animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

/* Animasi masuk angka skor saat berubah */
@keyframes scorePop {
  0% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.score-pop { animation: scorePop .28s ease-out; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a3040; border-radius: 8px; border: 2px solid var(--ink); }

/* Cetak (rekapitulasi -> PDF) */
@media print {
  body { background: #fff !important; color: #111 !important; }
  .no-print { display: none !important; }
  .print-card { border: 1px solid #ccc !important; background: #fff !important; color: #111 !important; }
  .print-dark-text, .print-dark-text * { color: #111 !important; }
  .doc-copy, .doc-copy p, .doc-copy li, .doc-table td { color: #222 !important; }
  .doc-copy h2, .doc-copy h3, .doc-copy strong { color: #111 !important; }
  .doc-section { break-inside: avoid; border: 1px solid #ccc !important; background: #fff !important; }
  .doc-link { color: #111 !important; }
}
