/* ================================================
   BKHN 2026 - Style Sheet
   Theme: Red · Pink · White
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: #fff5f6;
  color: #1a0a0a;
  min-height: 100vh;
}
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ─── Color Tokens ─── */
:root {
  --red:        #c8001a;
  --red-deep:   #8b0012;
  --red-vivid:  #e8001d;
  --pink:       #ff4d7e;
  --pink-light: #ff85a1;
  --pink-pale:  #ffd6df;
  --rose:       #fff0f3;
  --white:      #ffffff;
  --gray-50:    #fafafa;
  --gray-100:   #f4f4f5;
  --gray-200:   #e4e4e7;
  --gray-400:   #a1a1aa;
  --gray-600:   #52525b;
  --gray-800:   #27272a;
  --shadow-sm:  0 1px 3px rgba(200,0,26,.08);
  --shadow-md:  0 4px 16px rgba(200,0,26,.12);
  --shadow-lg:  0 8px 32px rgba(200,0,26,.18);
  --shadow-xl:  0 16px 48px rgba(200,0,26,.22);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #fde8ec; }
::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 999px; }

/* ─── Typography ─── */
.grad-red {
  background: linear-gradient(135deg, var(--red-vivid), var(--red), var(--red-deep));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-pink {
  background: linear-gradient(135deg, #ff4d7e, #c8001a);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-rose {
  background: linear-gradient(135deg, #ffb3c1, #ff4d7e, #c8001a);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,0,26,0); }
  50%       { box-shadow: 0 0 20px 6px rgba(200,0,26,.25); }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scaleIn {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes popIn {
  from { transform: scale(.8) translateY(20px); opacity: 0; }
  to   { transform: scale(1)  translateY(0);    opacity: 1; }
}
@keyframes slideRight {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

.anim-fade-up  { animation: fadeInUp .5s cubic-bezier(.4,0,.2,1) both; }
.anim-fade-in  { animation: fadeIn .35s ease both; }
.anim-float    { animation: float 3.5s ease-in-out infinite; }
.anim-pulse    { animation: pulse-red 2.2s ease-in-out infinite; }
.anim-scale-in { animation: scaleIn .35s cubic-bezier(.34,1.56,.64,1) both; }

/* ─── Layout ─── */
.container {
  width: 100%; max-width: 1280px;
  margin: 0 auto; padding: 0 16px;
}

/* ─── Sticky Nav ─── */
#navbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1.5px solid var(--pink-pale);
  box-shadow: 0 2px 16px rgba(200,0,26,.07);
}
.nav-inner {
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 16px;
  max-width: 1280px; margin: 0 auto;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--red-vivid), var(--red-deep));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(200,0,26,.35);
  animation: pulse-red 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
.nav-logo-text { font-weight: 900; font-size: 18px; color: var(--red-deep); }
.nav-logo-text span { color: var(--pink); }
.nav-spacer { flex: 1; }
.nav-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--rose); border: 1.5px solid var(--pink-pale);
  border-radius: 999px; padding: 5px 14px;
  font-size: 12px; font-weight: 600; color: var(--red);
}
.nav-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green { 0%,100%{opacity:1}50%{opacity:.4} }
.nav-info-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--rose); border: 1.5px solid var(--pink-pale);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; color: var(--red);
  transition: all .2s; flex-shrink: 0;
}
.nav-info-btn:hover { background: var(--pink-pale); transform: scale(1.08); }

/* ─── Hero ─── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fff5f6 40%, #ffdde5 100%);
  padding: 64px 16px 48px;
  text-align: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff4d7e' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-deco {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.hero-deco-1 { width: 400px; height: 400px; background: rgba(200,0,26,.06); top: -100px; left: -100px; }
.hero-deco-2 { width: 300px; height: 300px; background: rgba(255,77,126,.08); top: 0; right: -80px; }
.hero-deco-3 { width: 250px; height: 250px; background: rgba(200,0,26,.05); bottom: -60px; left: 50%; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rose); border: 1.5px solid var(--pink-pale);
  border-radius: 999px; padding: 6px 18px;
  font-size: 12px; font-weight: 600; color: var(--red);
  margin-bottom: 20px;
}
.hero-badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse-red 1.5s infinite; display: inline-block; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900; line-height: 1.15;
  color: var(--gray-800); margin-bottom: 12px;
}
.hero p {
  font-size: 16px; color: var(--gray-600);
  max-width: 580px; margin: 0 auto 32px; line-height: 1.6;
}
.hero-stats {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 12px;
  max-width: 520px; margin: 0 auto;
}
.hero-stat {
  background: var(--white); border: 1.5px solid var(--pink-pale);
  border-radius: 16px; padding: 14px 24px; text-align: center;
  box-shadow: var(--shadow-sm);
  flex: 1; min-width: 100px;
  transition: transform .25s, box-shadow .25s;
}
.hero-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.hero-stat-val { font-size: 28px; font-weight: 900; }
.hero-stat-lbl { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ─── Cards ─── */
.card {
  background: var(--white);
  border: 1.5px solid var(--pink-pale);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1.5px solid var(--pink-pale);
}
.card-title {
  font-size: 15px; font-weight: 800; color: var(--gray-800);
}
.card-subtitle { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.card-body { padding: 20px 24px; }

/* ─── Method Tabs ─── */
.method-tabs {
  display: flex; gap: 6px; padding: 6px;
  background: var(--rose); border-radius: 16px;
  flex-wrap: wrap;
}
.method-tab {
  flex: 1; min-width: fit-content;
  padding: 9px 16px; border-radius: 11px;
  border: none; background: transparent;
  font-family: inherit; font-size: 12px; font-weight: 700;
  color: var(--gray-600); cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.method-tab:hover { background: var(--white); color: var(--red); }
.method-tab.active {
  background: linear-gradient(135deg, var(--red-vivid), var(--red-deep));
  color: #fff;
  box-shadow: 0 4px 16px rgba(200,0,26,.35);
}
.method-tab .tab-icon { margin-right: 5px; }

/* ─── Score Checker ─── */
#scoreChecker {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border-radius: 20px; padding: 24px;
  color: #fff; position: relative; overflow: hidden;
}
#scoreChecker::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='0.04'%3E%3Ccircle cx='20' cy='20' r='3'/%3E%3C/g%3E%3C/svg%3E");
}
.checker-inner { position: relative; z-index: 1; }
.checker-title {
  font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.checker-sub { font-size: 12px; color: rgba(255,255,255,.7); margin-bottom: 18px; }
.checker-row {
  display: grid; grid-template-columns: 1fr 1fr auto;
  gap: 12px; align-items: end;
}
@media(max-width: 600px) {
  .checker-row { grid-template-columns: 1fr; }
}
.checker-field label {
  display: block; font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,.75); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px;
}
.checker-input {
  width: 100%; background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 12px; padding: 11px 14px;
  font-family: inherit; font-size: 15px; font-weight: 700;
  color: #fff; transition: all .2s;
}
.checker-input::placeholder { color: rgba(255,255,255,.45); }
.checker-input:focus { outline: none; border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.22); }
.checker-select {
  width: 100%; background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 12px; padding: 11px 14px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: #fff; cursor: pointer; transition: all .2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,.7)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}
.checker-select option { background: #8b0012; color: #fff; }
.checker-select:focus { outline: none; border-color: rgba(255,255,255,.7); }
.checker-btn {
  background: #fff; color: var(--red);
  border: none; border-radius: 12px;
  padding: 12px 22px; font-family: inherit;
  font-size: 13px; font-weight: 800; cursor: pointer;
  transition: all .25s; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  display: flex; align-items: center; gap: 7px;
}
.checker-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.checker-result {
  margin-top: 14px; padding: 12px 16px;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 12px;
  font-size: 13px; color: rgba(255,255,255,.9);
  display: none;
}
.checker-result.show { display: block; }
.checker-result strong { color: #fff; }

/* ─── Filter Bar ─── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
  padding: 16px 24px;
  background: var(--rose); border-bottom: 1.5px solid var(--pink-pale);
}
.filter-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 160px; }
.filter-group label { font-size: 11px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .5px; }
.filter-input, .filter-select {
  background: var(--white); border: 1.5px solid var(--pink-pale);
  border-radius: 10px; padding: 9px 12px;
  font-family: inherit; font-size: 13px; color: var(--gray-800);
  transition: border-color .2s;
}
.filter-input:focus, .filter-select:focus {
  outline: none; border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255,77,126,.12);
}
.filter-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 28px; cursor: pointer;
}
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 14px; border-radius: 999px; font-size: 11px; font-weight: 700;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all .2s;
}
.chip-outline {
  background: var(--white); border-color: var(--pink-pale); color: var(--gray-600);
}
.chip-outline:hover { border-color: var(--pink); color: var(--red); }
.chip-red {
  background: linear-gradient(135deg, var(--red-vivid), var(--red));
  color: #fff; border-color: var(--red);
  box-shadow: 0 2px 8px rgba(200,0,26,.25);
}

/* ─── Main Table ─── */
.table-wrap { overflow-x: auto; }
.main-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.main-table thead tr {
  background: linear-gradient(to right, #fff5f6, #fff);
  border-bottom: 2px solid var(--pink-pale);
}
.main-table th {
  padding: 12px 14px; text-align: left;
  font-size: 11px; font-weight: 800; color: var(--red);
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap;
}
.main-table th.center { text-align: center; }
.main-table tbody tr { border-bottom: 1px solid #fff0f3; transition: background .15s; cursor: pointer; }
.main-table tbody tr:hover { background: #fff0f3; }
.main-table tbody tr.selected { background: #ffe0e8 !important; border-left: 3px solid var(--red); }
.main-table td { padding: 12px 14px; }
.major-name { font-weight: 700; color: var(--gray-800); font-size: 13px; }
.major-code { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.score-cell { text-align: center; }
.score-val { font-weight: 800; font-size: 14px; }
.score-pred { font-size: 14px; font-weight: 900; }
.score-pred.up   { color: #059669; }
.score-pred.down { color: var(--red); }
.score-pred.flat { color: #d97706; }
.diff-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800;
  white-space: nowrap;
}
.diff-up   { background: #dcfce7; color: #15803d; }
.diff-down { background: #fee2e2; color: #dc2626; }
.diff-flat { background: #fef9c3; color: #a16207; }
.user-eligible { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.user-near     { background: #fef9c3; color: #a16207; border: 1px solid #fde68a; }
.user-fail     { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }

/* ─── Hot meter ─── */
.hot-meter { display: inline-flex; align-items: center; gap: 5px; }
.hot-dots { display: flex; gap: 2px; }
.hot-dot { width: 6px; height: 6px; border-radius: 50%; }
.hot-dot.on  { background: var(--red); }
.hot-dot.off { background: var(--pink-pale); }
.hot-num { font-size: 11px; font-weight: 700; color: var(--gray-400); }

/* ─── Detail Panel ─── */
#detailPanel {
  background: var(--white);
  border: 1.5px solid var(--pink-pale);
  border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: fit-content; position: sticky; top: 80px;
}
.detail-empty {
  padding: 48px 24px; text-align: center;
}
.detail-empty-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--rose); border: 2px dashed var(--pink-pale);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; animation: float 3.5s ease-in-out infinite;
}
.detail-empty p { font-size: 13px; color: var(--gray-400); line-height: 1.6; }
.detail-header {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  padding: 20px 20px 16px; color: #fff;
  position: relative;
}
.detail-close-btn {
  display: none; position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.2); border: none; color: #fff;
  font-size: 16px; font-weight: bold; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
}
.detail-code { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.65); margin-bottom: 5px; }
.detail-name { font-size: 16px; font-weight: 900; color: #fff; line-height: 1.3; }
.detail-combo { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 6px; }
.detail-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }

.score-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.score-box {
  background: var(--rose); border: 1.5px solid var(--pink-pale);
  border-radius: 12px; padding: 10px; text-align: center;
}
.score-box.pred {
  background: linear-gradient(135deg, #fff5f6, #ffdde5);
  border-color: var(--pink-light);
}
.score-box-lbl { font-size: 10px; font-weight: 700; color: var(--gray-400); margin-bottom: 4px; }
.score-box-val { font-size: 20px; font-weight: 900; color: var(--gray-800); }
.score-box.pred .score-box-val { color: var(--red); }

.change-box {
  background: var(--rose); border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  border-left: 4px solid var(--red);
}
.change-icon { font-size: 22px; flex-shrink: 0; }
.change-label { font-weight: 800; font-size: 13px; }
.change-amount { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

.mini-chart-wrap { height: 140px; position: relative; }

.section-label {
  font-size: 11px; font-weight: 800; color: var(--red);
  text-transform: uppercase; letter-spacing: .6px;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
}
.prog-item { margin-bottom: 10px; }
.prog-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.prog-name { font-size: 12px; color: var(--gray-600); }
.prog-val  { font-size: 12px; font-weight: 800; color: var(--red); }
.prog-track { height: 6px; border-radius: 999px; background: var(--pink-pale); overflow: hidden; }
.prog-fill { height: 100%; border-radius: 999px; background: linear-gradient(to right, var(--pink), var(--red)); transition: width .8s cubic-bezier(.4,0,.2,1); }

.reason-box {
  background: var(--rose); border-radius: 12px; padding: 12px 14px;
  font-size: 12px; color: var(--gray-600); line-height: 1.7;
}
.spec-note {
  margin-top: 8px; padding: 8px 12px; border-radius: 8px;
  background: #fef9c3; color: #a16207; font-size: 11px; font-weight: 600;
}

/* ─── Spectrum Section ─── */
.spectrum-section {
  background: var(--white);
  border: 1.5px solid var(--pink-pale);
  border-radius: 20px; padding: 24px;
  box-shadow: var(--shadow-sm);
}
.spectrum-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 20px;
}
.meta-card {
  background: var(--rose); border: 1.5px solid var(--pink-pale);
  border-radius: 12px; padding: 14px;
}
.meta-lbl { font-size: 11px; color: var(--gray-400); margin-bottom: 4px; }
.meta-val { font-size: 16px; font-weight: 900; color: var(--gray-800); }
.meta-sub { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ─── Popup ─── */
.popup-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(26,10,10,.55); backdrop-filter: blur(6px);
  z-index: 900; align-items: center; justify-content: center;
}
.popup-overlay.show { display: flex; }
.popup-box {
  background: var(--white); border-radius: 24px;
  padding: 32px; max-width: 380px; width: calc(100% - 32px);
  position: relative; box-shadow: var(--shadow-xl);
  animation: popIn .35s cubic-bezier(.34,1.56,.64,1);
  border: 1.5px solid var(--pink-pale);
}
.popup-close {
  position: absolute; top: 14px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--rose); border: none;
  font-size: 16px; cursor: pointer; color: var(--red);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.popup-close:hover { background: var(--pink-pale); }
.popup-emoji { font-size: 36px; margin-bottom: 12px; }
.popup-title { font-size: 20px; font-weight: 900; color: var(--gray-800); margin-bottom: 8px; }
.popup-body { font-size: 13px; color: var(--gray-600); line-height: 1.7; }
.popup-body ul { margin: 8px 0 0 16px; }
.popup-body li { margin-bottom: 4px; }
.popup-warn {
  margin-top: 14px; padding: 10px 14px; border-radius: 10px;
  background: #fef9c3; color: #a16207;
  font-size: 12px; font-weight: 600;
}

/* ─── Stats bar ─── */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.stat-card {
  background: var(--white); border: 1.5px solid var(--pink-pale);
  border-radius: 16px; padding: 16px;
  transition: transform .25s, box-shadow .25s;
  box-shadow: var(--shadow-sm);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-lbl { font-size: 11px; color: var(--gray-400); margin-bottom: 4px; }
.stat-val { font-size: 26px; font-weight: 900; }
.stat-sub { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ─── Main layout ─── */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px; align-items: start;
}
@media(max-width: 1100px) { 
  .main-layout { grid-template-columns: 1fr; }
  
  #detailPanel {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto;
    height: 85vh; z-index: 1000;
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 24px 24px 0 0;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(200,0,26,0.25);
    border: none;
  }
  #detailPanel.show-mobile { transform: translateY(0); }
  .detail-close-btn { display: flex; }
}

/* ─── Section spacing ─── */
.section { margin-bottom: 24px; }

/* ─── Footer ─── */
footer {
  background: linear-gradient(135deg, var(--red-deep), var(--red));
  color: rgba(255,255,255,.7); text-align: center;
  padding: 16px; font-size: 12px;
}
footer strong { color: #fff; }

/* ─── Responsive tweaks ─── */
@media(max-width: 640px) {
  .hero { padding: 40px 16px 32px; }
  .hero-stats { gap: 8px; }
  .hero-stat { padding: 12px 16px; }
  .hero-stat-val { font-size: 22px; }
  .card-header { padding: 14px 16px; }
  .card-body { padding: 16px; }
  .filter-bar { padding: 12px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .checker-row { grid-template-columns: 1fr; }
  .method-tabs { gap: 4px; }
  .method-tab { padding: 8px 10px; font-size: 11px; }

  /* Responsive Table Redesign */
  .main-table thead { display: none; }
  .main-table, .main-table tbody, .main-table tr, .main-table td { display: block; width: 100%; }
  .main-table tr {
    margin-bottom: 16px;
    border: 1.5px solid var(--pink-pale);
    border-radius: 16px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(200,0,26,0.06);
  }
  .main-table td {
    padding: 10px 4px;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none !important;
    border-bottom: 1px dashed var(--pink-pale) !important;
  }
  .main-table td:last-child { border-bottom: none !important; }
  
  .main-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--gray-500);
    font-size: 11px;
    text-transform: uppercase;
  }
  
  /* Custom style for the Major Name cell on mobile */
  .main-table td[data-label="Ngành"] {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: var(--rose);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 8px;
    border-bottom: none !important;
  }
  .main-table td[data-label="Ngành"]::before { display: none; }
  .main-table td[data-label="Ngành"] > div { width: 100%; }

  .hide-mobile { display: none !important; }
}
@media(max-width: 400px) {
  .hero h1 { font-size: 1.8rem; }
  .score-row { grid-template-columns: 1fr 1fr 1fr; }
  .score-box-val { font-size: 16px; }
}

/* ─── Utility ─── */
.hidden { display: none !important; }
.text-red   { color: var(--red); }
.text-pink  { color: var(--pink); }
.text-green { color: #059669; }
.text-amber { color: #d97706; }
.fw-900 { font-weight: 900; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.gap-row { display: flex; gap: 8px; align-items: center; }
select { appearance: none; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* CUSTOM MODAL */
.share-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.share-modal-overlay.hidden {
  display: none;
}
.share-modal-content {
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f4f4f5;
  padding-bottom: 16px;
}
