/* =====================================================
   ROOT – ĐỎ VÀNG SÂN KHẤU (GEN Z, KHÔNG SẾN)
   ===================================================== */
:root {
  --bg-main: #1a0e0e;
  --bg-deep: #0f0707;

  --red-main: #6e1f1f;
  --red-deep: #4a1414;

  --gold-main: #c7a24c;
  --gold-soft: #e6d7a3;

  --text-main: #f1eadf;
  --text-muted: #c9bfb3;

  --border-soft: rgba(199,162,76,0.28);
}

/* =====================================================
   RESET + BODY
   ===================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Be Vietnam Pro', sans-serif;
  color: var(--text-main);

  background:
    linear-gradient(rgb(47 12 12 / 44%), rgb(33 15 15 / 96%)),
    url("img/nen16.jpeg") center top / cover no-repeat;

  background-attachment: fixed;
  overflow-x: hidden;
  letter-spacing: 0.2px;
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar ul {
  display: flex;
  gap: 26px;
  list-style: none;
}

.navbar a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 8px;
}

.navbar a:hover,
.navbar a.active {
  background: rgba(197,191,101,0.12);
  color: #fff;
}
/* =====================================================
   HERO
   ===================================================== */
.hero {
  padding: 120px 30px 60px;
  max-width: 920px;
  margin: auto;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 50%;
  width: 520px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(199,162,76,0.28),
    transparent 65%
  );
  pointer-events: none;
}

.hero h1 {
  max-width: 640px;
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  color: var(--gold-soft);
  line-height: 1.08;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.6),
    0 0 34px rgba(199,162,76,0.35);
}

.hero p {
  max-width: 420px;
  margin-top: 18px;
  color: var(--text-muted);
  font-style: italic;
}

/* =====================================================
   MAIN
   ===================================================== */
.learning {
  max-width: 920px;
  margin: auto;
  padding: 0 20px 160px;
}

/* =====================================================
   PROGRESS
   ===================================================== */
.progress {
  height: 4px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--red-main),
    var(--gold-main)
  );
  transition: width 0.4s ease;
}

/* =====================================================
   VISIBILITY CONTROL – CỐT LÕI
   ===================================================== */
/* =====================================================
   VISIBILITY CONTROL – FIX CHUẨN
   ===================================================== */
.hidden {
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
}

.hidden.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: 0.7s ease;
}

/* =====================================================
   CARD – NHẸ LẠI NHƯNG SÂU
   ===================================================== */
.slide,
.tab-content,
.compare,
.unlock,
.flip-card div {
  background: linear-gradient(
    180deg,
    rgb(167 45 45 / 0%),
    rgb(43 13 13 / 54%)
  );
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 26px 28px;
  box-shadow: 0 20px 42px rgba(0,0,0,0.6);
  position: relative;
}

/* =====================================================
   PHÒNG NHẠC LÝ – FULL POLISH CSS (FINAL)
   ĐỎ – VÀNG SÂN KHẤU | GEN Z | KHÔNG GLASS
   ===================================================== */

/* ---------- SLIDES ---------- */
.slides {
  margin-top: 60px;
}

.slide {
  display: none;
  margin-bottom: 90px;
  line-height: 1.6;
}

.slide.active {
  display: block;
  animation: fadeUp 0.8s ease;
}

.slide h2 {
  color: var(--gold-soft);
  font-size: 1.7rem;
  margin-bottom: 12px;
}

.slide p {
  color: var(--text-muted);
  max-width: 420px;
}

/* nút tiếp */
#nextSlide {
  padding: 10px 34px;
  border-radius: 999px;
  border: 1px solid var(--gold-main);
  background: transparent;
  color: var(--gold-main);
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: 0.3s ease;
}

#nextSlide:hover {
  background: var(--gold-main);
  color: #1a0e0e;
  transform: translateY(-2px);
}

/* ---------- TABS ---------- */
.tabs {
  margin-top: 120px;
}

.tab-buttons {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tab-buttons button {
  background: rgba(15,7,7,0.85);
  border: 1px solid var(--border-soft);
  color: var(--gold-soft);
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s ease;
}

.tab-buttons button:hover,
.tab-buttons button.active {
  background: var(--red-main);
  color: #fff;
}

.tab-content {
  display: none;
  max-width: 520px;
  line-height: 1.6;
}

.tab-content.active {
  display: block;
  animation: fadeUp 0.6s ease;
}

/* ---------- EMOTION MAP ---------- */
.emotion-map {
  margin-top: 140px;
}

.emotion-map h2 {
  text-align: center;
  color: var(--gold-soft);
  margin-bottom: 60px;
  font-size: 1.8rem;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.6),
    0 0 22px rgba(199,162,76,0.35);
}

.emotion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.emotion-card {
  background: linear-gradient(
    180deg,
    rgb(74 36 36 / 20%),
    rgb(55 17 17 / 60%)
  );
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 26px 24px;
  box-shadow: 0 18px 38px rgba(0,0,0,0.55);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.emotion-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 54px rgba(0,0,0,0.7);
}

.emotion-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.15rem;
  color: var(--gold-main);
}

.emotion-card p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.emotion-card .note {
  margin-top: 14px;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-muted);
  border-left: 3px solid rgba(199,162,76,0.45);
  padding-left: 12px;
}

/* viền tinh theo cảm xúc */
.emotion-card.sad {
  box-shadow: inset 0 0 0 1px rgba(120,60,60,0.25),
              0 18px 38px rgba(0,0,0,0.55);
}

.emotion-card.remember {
  box-shadow: inset 0 0 0 1px rgba(160,130,80,0.25),
              0 18px 38px rgba(0,0,0,0.55);
}

.emotion-card.happy {
  box-shadow: inset 0 0 0 1px rgba(199,162,76,0.35),
              0 18px 38px rgba(0,0,0,0.55);
}

.emotion-card.tense {
  box-shadow: inset 0 0 0 1px rgba(180,70,50,0.35),
              0 18px 38px rgba(0,0,0,0.55);
}

/* ---------- SO SÁNH ---------- */
.compare {
  margin-top: 140px;
}

.compare h2 {
  color: var(--gold-soft);
}

.compare-grid {
  display: flex;
  flex-direction: column;
  gap: 46px;
  margin-top: 40px;
}

.flip-card {
  perspective: 1000px;
}

.flip-card div {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  backface-visibility: hidden;
  transition: transform 0.6s ease;
}

.flip-card .back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

.flip-card:hover .front {
  transform: rotateY(180deg);
}

.flip-card:hover .back {
  transform: rotateY(0);
}

/* ---------- UNLOCK ---------- */
.unlock {
  margin-top: 160px;
  text-align: center;
}

.unlock h2 {
  margin-bottom: 28px;
  color: var(--gold-soft);
}

/* ---------- ANIMATION ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cta {
  display: inline-block;
  padding: 12px 36px;
  border-radius: 999px;
  border: 1px solid var(--gold-main);
  color: var(--gold-main);
  text-decoration: none;
  transition: 0.3s ease;
}

.cta:hover {
  background: var(--red-main);
  color: #fff;
  transform: translateY(-3px);
}

/* =====================================================
   MOBILE
   ===================================================== */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  .hero {
    padding: 150px 16px 120px;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .slide,
  .tab-content,
  .compare,
  .unlock {
    padding: 22px;
  }

  .slide:nth-child(2),
  .flip-card:nth-child(2) {
    margin-left: 0;
  }
}
.emotion-map {
  margin-top: 120px;
}

/* =====================================================
   BỔ SUNG ĐỂ PHÒNG ĐỠ TRỐNG – CÓ NHỊP – KHÔNG GLASS
   ===================================================== */

/* ---- CÂU DẪN CHUYỂN NHỊP ---- */
.transition-text {
  margin: 100px auto 120px;
  max-width: 520px;
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.7;
  opacity: 0.9;
}

/* ---- NHỊP NỀN CHO SECTION (KHÔNG ĐỔI BACKGROUND) ---- */
.tabs,
.emotion-map,
.compare,
.unlock {
  position: relative;
}

.tabs::before,
.emotion-map::before,
.compare::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(
    ellipse at center,
    rgba(199,162,76,0.08),
    transparent 70%
  );
  pointer-events: none;
}

/* ---- FLIP CARD CÓ TRỌNG LƯỢNG HƠN ---- */
.flip-card:hover .front,
.flip-card:hover .back {
  box-shadow: 0 28px 60px rgba(0,0,0,0.75);
}
