/*
  W3FS – Thiên Thư Dark/Gold UI
  - Scoped to w3fs blocks, minimal risk to theme
*/

.w3fs-colors,
.w3fs-loban,
.w3fs-bat-trach,
.w3fs-checklist,
.w3fs-phitinh{
  --tt-bg: #07070a;
  --tt-card: rgba(12, 14, 20, .92);
  --tt-card2: rgba(10, 12, 18, .92);
  --tt-gold: #f6e7b6;
  --tt-gold2: #d4b264;
  --tt-ink: #0b0c10;
  --tt-muted: rgba(246,231,182,.78);
  --tt-muted2: rgba(246,231,182,.66);
  --tt-border: rgba(246,231,182,.16);
  --tt-border2: rgba(246,231,182,.12);
  --tt-shadow: 0 12px 38px rgba(0,0,0,.38);

  background: linear-gradient(180deg, var(--tt-card), var(--tt-card2));
  border: 1px solid var(--tt-border);
  border-radius: 18px;
  padding: 16px;
  color: rgba(246,231,182,.92);
  box-shadow: var(--tt-shadow);
}

@media (min-width: 900px){
  .w3fs-colors,
  .w3fs-loban,
  .w3fs-bat-trach,
  .w3fs-checklist{ padding: 18px; }
}

.w3fs-colors h3,
.w3fs-loban h3,
.w3fs-bat-trach h3,
.w3fs-checklist h3,
.w3fs-phitinh h3{
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: .2px;
  color: var(--tt-gold);
}

.w3fs-colors h4,
.w3fs-loban h4,
.w3fs-bat-trach h4,
.w3fs-checklist h4,
.w3fs-phitinh h4{
  margin: 12px 0 8px;
  font-size: 14px;
  color: rgba(246,231,182,.9);
}

.w3fs-colors label,
.w3fs-loban label,
.w3fs-bat-trach label,
.w3fs-checklist label,
.w3fs-phitinh label{
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  opacity: .88;
}

.w3fs-colors input,
.w3fs-colors select,
.w3fs-colors textarea,
.w3fs-loban input,
.w3fs-loban select,
.w3fs-loban textarea,
.w3fs-bat-trach input,
.w3fs-bat-trach select,
.w3fs-bat-trach textarea,
.w3fs-checklist input,
.w3fs-checklist select,
.w3fs-checklist textarea,
.w3fs-phitinh input,
.w3fs-phitinh select,
.w3fs-phitinh textarea{
  width: 100%;
  max-width: 520px;
  background: rgba(0,0,0,.32);
  border: 1px solid var(--tt-border2);
  color: rgba(246,231,182,.92);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.w3fs-colors input:focus,
.w3fs-colors select:focus,
.w3fs-colors textarea:focus,
.w3fs-loban input:focus,
.w3fs-loban select:focus,
.w3fs-loban textarea:focus,
.w3fs-bat-trach input:focus,
.w3fs-bat-trach select:focus,
.w3fs-bat-trach textarea:focus,
.w3fs-checklist input:focus,
.w3fs-checklist select:focus,
.w3fs-checklist textarea:focus,
.w3fs-phitinh input:focus,
.w3fs-phitinh select:focus,
.w3fs-phitinh textarea:focus{
  border-color: rgba(246,231,182,.28);
  box-shadow: 0 0 0 3px rgba(246,231,182,.10);
}

.w3fs-colors button,
.w3fs-loban button,
.w3fs-bat-trach button,
.w3fs-checklist button,
.w3fs-phitinh button{
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(180deg, var(--tt-gold), var(--tt-gold2));
  color: var(--tt-ink);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  transition: transform .12s ease, filter .12s ease;
}

.w3fs-colors button:hover,
.w3fs-loban button:hover,
.w3fs-bat-trach button:hover,
.w3fs-checklist button:hover,
.w3fs-phitinh button:hover{ filter: brightness(1.03); }

.w3fs-colors button:active,
.w3fs-loban button:active,
.w3fs-bat-trach button:active,
.w3fs-checklist button:active,
.w3fs-phitinh button:active{ transform: translateY(1px); }

.w3fs-colors a,
.w3fs-loban a,
.w3fs-bat-trach a,
.w3fs-checklist a,
.w3fs-phitinh a{
  color: var(--tt-gold);
  text-decoration: none;
  border-bottom: 1px dashed rgba(246,231,182,.38);
}

.w3fs-colors a:hover,
.w3fs-loban a:hover,
.w3fs-bat-trach a:hover,
.w3fs-checklist a:hover,
.w3fs-phitinh a:hover{ border-bottom-color: rgba(246,231,182,.62); }

/* Phi Tinh grid */
.w3fs-pt-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.w3fs-pt-cell{
  border: 1px solid rgba(246,231,182,.14);
  background: rgba(0,0,0,.18);
  border-radius: 14px;
  padding: 10px;
  min-height: 96px;
}
.w3fs-pt-cell .dir{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 900;
  color: rgba(246,231,182,.96);
}
.w3fs-pt-cell .stars{
  display:flex;
  flex-wrap:wrap;
  gap: 6px;
}
.w3fs-pt-pill{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(246,231,182,.14);
  background: rgba(0,0,0,.16);
  font-size: 12px;
}
.w3fs-pt-pill b{ color: rgba(246,231,182,.98); }
.w3fs-pt-pill .k{ opacity:.78; font-weight: 800; }
.w3fs-pt-pill.good{ border-color: rgba(140, 255, 199, .22); }
.w3fs-pt-pill.bad{ border-color: rgba(255, 154, 154, .22); }

.w3fs-pt-meta{
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(246,231,182,.78);
}

.w3fs-form-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.w3fs-field{
  display: block;
  flex: 1 1 240px;
  min-width: 220px;
}

.w3fs-label{ display:block; margin-bottom: 6px; }

.w3fs-out{ margin-top: 12px; }

.w3fs-card{
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(246,231,182,.12);
  border-radius: 14px;
  padding: 12px;
}

.w3fs-muted{ color: var(--tt-muted2); font-size: 13px; line-height: 1.6; }

.w3fs-tags{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }

.w3fs-tag{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246,231,182,.14);
  background: rgba(0,0,0,.18);
  font-size: 12.5px;
  line-height: 1;
}

.w3fs-tag .k{ opacity:.78; font-weight: 700; }

.w3fs-tag.good{ border-color: rgba(140, 255, 199, .22); }
.w3fs-tag.bad{ border-color: rgba(255, 154, 154, .22); }

.w3fs-cols{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px){ .w3fs-cols{ grid-template-columns: 1fr 1fr; } }

.w3fs-cols ul,
.w3fs-checklist ul{ margin: 8px 0 0 18px; }

.w3fs-cols li,
.w3fs-checklist li{ margin: 6px 0; line-height: 1.55; }

.w3fs-empty{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(246,231,182,.22);
  background: rgba(0,0,0,.18);
  color: var(--tt-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Form layout helpers (when present) */
.w3fs-row{ display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
.w3fs-row > *{ flex: 0 1 auto; }

/* Table (Phi tinh etc. if used later) */
.w3fs-table{
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(246,231,182,.14);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
}
.w3fs-table th,
.w3fs-table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(246,231,182,.10);
}
.w3fs-table th{
  text-align: left;
  color: rgba(246,231,182,.92);
  background: rgba(0,0,0,.20);
  font-size: 13px;
}
.w3fs-table td{ color: rgba(246,231,182,.86); font-size: 13px; }


/* =====================================================
   W3FS Page Templates (Thiên Thư dark/gold)
   - Only applies when plugin template files are used
   ===================================================== */
.w3fs-page{
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 16px;
  color: rgba(255,255,255,.9);
}
.w3fs-page a{ color: rgba(255,215,120,.98); text-decoration: none; }

.w3fs-btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:.45rem;
  padding:.62rem .95rem;
  border-radius:999px;
  border:1px solid rgba(255,215,120,.38);
  background: linear-gradient(180deg, rgba(255,215,120,.18), rgba(255,215,120,.07));
  color: rgba(255,235,200,.98);
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.w3fs-btn:hover{ transform: translateY(-1px); border-color: rgba(255,215,120,.6); }
.w3fs-btn.secondary{
  background: rgba(0,0,0,.22);
  border-color: rgba(255,215,120,.28);
}
.w3fs-faq details{
  border: 1px solid rgba(255,215,120,.18);
  border-radius: 14px;
  padding: .75rem .9rem;
  margin: .7rem 0;
  background: rgba(0,0,0,.22);
}
.w3fs-faq summary{
  cursor:pointer;
  font-weight: 800;
  color: rgba(255,235,190,.98);
  list-style: none;
}
.w3fs-faq summary::-webkit-details-marker{ display:none; }
.w3fs-faq p{ margin: .6rem 0 0; color: rgba(255,245,225,.88); }

.w3fs-page a:hover{ text-decoration: underline; }

.w3fs-bc{
  display:flex; flex-wrap:wrap; align-items:center;
  gap:8px;
  font-size: 13px;
  opacity:.9;
  margin: 6px 0 16px;
}
.w3fs-bc .sep{ opacity:.6; }
.w3fs-hero{
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,215,120,.18);
  background: radial-gradient(900px 420px at 20% -10%, rgba(255,215,120,.12), transparent 70%),
              linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,.92));
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.w3fs-hero h1{
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.18;
  color: rgba(255,215,120,.98);
  letter-spacing: .3px;
}
.w3fs-hero p{ margin: 0; max-width: 76ch; opacity: .92; }

.w3fs-meta{
  display:flex; flex-wrap:wrap; gap:8px;
  margin-top: 12px;
}
.w3fs-chip{
  display:inline-flex; align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,215,120,.18);
  background: rgba(255,255,255,.03);
  font-size: 12px;
  opacity: .95;
}
.w3fs-chip strong{ color: rgba(255,215,120,.92); font-weight: 700; }

.w3fs-layout{
  display:grid;
  grid-template-columns: 1.6fr .9fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 960px){
  .w3fs-layout{ grid-template-columns: 1fr; }
}

.w3fs-panel{
  border-radius: 16px;
  border: 1px solid rgba(255,215,120,.14);
  background: rgba(0,0,0,.65);
  box-shadow: 0 10px 26px rgba(0,0,0,.26);
  padding: 16px 16px 14px;
}
.w3fs-panel h2, .w3fs-panel h3{
  margin: 0 0 10px;
  color: rgba(255,215,120,.94);
  letter-spacing: .2px;
}
.w3fs-panel h2{ font-size: 18px; }
.w3fs-panel h3{ font-size: 15px; opacity: .95; }
.w3fs-panel p{ margin: 10px 0; }
.w3fs-panel ul{ margin: 10px 0 10px 18px; }
.w3fs-muted{ opacity: .8; font-size: 13px; }

.w3fs-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 960px){ .w3fs-grid{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 560px){ .w3fs-grid{ grid-template-columns: 1fr;} }

.w3fs-cardlink{
  display:block;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,215,120,.14);
  background: rgba(0,0,0,.62);
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}
.w3fs-cardlink .t{
  margin: 0 0 8px;
  color: rgba(255,215,120,.98);
  font-weight: 800;
  letter-spacing: .2px;
}
.w3fs-cardlink .d{ margin: 0; opacity: .86; font-size: 13px; }

.w3fs-pagination{
  margin: 18px 0 6px;
  display:flex; flex-wrap:wrap; gap:10px;
}
.w3fs-pagination a, .w3fs-pagination span{
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 36px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,215,120,.16);
  background: rgba(255,255,255,.03);
  color: rgba(255,215,120,.95);
  font-weight: 700;
  font-size: 13px;
}
.w3fs-pagination .current{
  background: rgba(255,215,120,.14);
  border-color: rgba(255,215,120,.28);
  color: rgba(255,255,255,.94);
}

.w3fs-split{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:10px}
@media (max-width: 760px){.w3fs-split{grid-template-columns:1fr}}

/* =====================================
 * Phi Tinh (Flying Stars) grid
 * ===================================== */
.w3fs-pt-meta{
  margin: 12px 0 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,215,120,.14);
  background: rgba(0,0,0,.58);
  font-size: 13px;
}
.w3fs-pt-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.w3fs-pt-cell{
  border-radius: 16px;
  border: 1px solid rgba(255,215,120,.14);
  background: rgba(0,0,0,.62);
  padding: 12px 12px 10px;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}
.w3fs-pt-title{
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(255,215,120,.98);
  margin: 0 0 8px;
  font-size: 13px;
}
.w3fs-pt-lines{
  display:grid;
  gap: 6px;
}
.w3fs-pt-lines > div{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,215,120,.10);
  background: rgba(255,255,255,.03);
}
.w3fs-pt-lines span{opacity:.82}
.w3fs-pt-lines strong{font-weight:900}
.w3fs-pt-lines a{color: rgba(255,215,120,.95); text-decoration:none}
.w3fs-pt-lines a:hover{text-decoration:underline}
@media (max-width: 760px){
  .w3fs-pt-grid{grid-template-columns: 1fr;}
}
