:root {
  --bg: #dfeaf5;
  --header-green: #005f37;
  --header-green-2: #0b7a43;
  --button-green: #006b33;
  --button-green-2: #005f37;
  --tab-bg: #cfe0f2;
  --tab-text: #2d84ea;
  --white: #ffffff;
  --line: #d8dde5;
  --row-bg: #f7f7f7;
  --medal-total: #efdf8b;
  --footer-text: #878b92;
  --link-blue: #2d84ea;
  --shadow-soft: 0 3px 12px rgba(0, 0, 0, 0.06);

  --font-main: "Roboto Condensed", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background: var(--bg);
  color: #111;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
}

button {
  font: inherit;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

.safe-top {
  height: env(safe-area-inset-top);
  min-height: 10px;
}

.app-header {
  background: linear-gradient(
    180deg,
    var(--header-green-2) 0%,
    var(--header-green) 100%
  );
}

.header-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 16px;
}

.logo-wrap {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-title {
  color: #ffffff;
  font-size: 29px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.main-content {
  padding: 2px 12px 110px;
}

.tabs-row {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;       /* ❗ không cho xuống dòng */
  overflow-x: auto;        /* nếu thiếu chỗ thì cuộn ngang */
}

.pill-tab {
  min-width: auto;
  height: 40px;
  padding: 0 15px;
  border-radius: 12px;
  background: var(--tab-bg);
  color: var(--tab-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

/* =========================
   CHỈ SỬA PHẦN BANNER
   ========================= */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.12fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin: 0 0 12px;
}

.card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
}

.hero-main,
.side-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  box-shadow: var(--shadow-soft);
}

.hero-main {
  aspect-ratio: 16 / 9;
}

.hero-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}

.side-card {
  aspect-ratio: 16 / 9;
}

.hero-main img,
.side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

.youtube-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 34px;
  height: 24px;
  border-radius: 7px;
  background: #ff2e2e;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.youtube-badge span {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  transform: translateX(1px);
}

/* ========================= */

.medal-card {
  background: #f4f4f4;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  width: 100%;
}

.medal-grid {
  display: grid;
  grid-template-columns: 42px minmax(0, 1.55fr) 44px 44px 44px 44px 54px;
  align-items: center;
  padding: 0 8px;
}

.medal-head {
  min-height: 30px;
  background: #118534;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.medal-total {
  min-height: 30px;
  background: var(--medal-total);
  color: #27210f;
  font-size: 14px;
  font-weight: 700;
}

.medal-row {
  min-height: 30px;
  background: var(--row-bg);
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}

.medal-head > div,
.medal-total > div,
.medal-row > div {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.unit {
  justify-content: flex-start !important;
  text-align: left;
  padding-left: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.linkish {
  color: var(--link-blue);
  font-weight: 700;
}

.more-row {
  width: 100%;
  min-height: 58px;
  background: var(--row-bg);
  border-top: 1px solid var(--line);
  color: var(--link-blue);
  font-size: 17px;
  font-weight: 800;
}

.main-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.main-action {
  width: 100%;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--button-green) 0%, var(--button-green-2) 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.copyright {
  text-align: center;
  color: var(--footer-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  padding-bottom: 22px;
}

.floating-left,
.floating-right {
  position: fixed;
  bottom: calc(70px + env(safe-area-inset-bottom));
  z-index: 20;
  border-radius: 50%;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.floating-left {
  left: 18px;
  width: 92px;
  height: 92px;
  background: #f3eeb6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-left img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 50%;
}

.floating-right {
  right: 18px;
  width: 84px;
  height: 84px;
  background: radial-gradient(circle at 35% 30%, #0a8c53 0%, #006b3e 65%, #005f37 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-bubble {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #eef1ef;
  color: #2d6e4d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  z-index: 15;
}

.bottom-item {
  min-height: 32px;
  color: var(--link-blue);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 860px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
  }

  .header-row {
    padding: 16px 18px 18px;
  }

  .logo-wrap {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }

  .header-title {
    font-size: 32px;
  }

  .main-content {
    padding: 14px 16px 116px;
  }

  .tabs-row {
    display: flex;
    align-items: center !important;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 14px !important;
  }

  .pill-tab {
    min-height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 22px !important;
    line-height: 1 !important;
  }

  /* CHỈ SỬA PHẦN BANNER */
  .hero-grid {
    grid-template-columns: minmax(0, 2.12fr) minmax(0, 1fr);
    gap: 14px;
  }

  .hero-side {
    gap: 14px;
  }

  .card {
    border-radius: 10px;
  }
  /* =================== */

  .medal-grid {
    grid-template-columns: 48px minmax(0, 1.7fr) 54px 54px 54px 54px 68px;
    padding: 0 14px;
  }

  .medal-head {
    min-height: 56px;
    font-size: 15px;
  }

  .medal-total,
  .medal-row {
    font-size: 15px;
  }

  .main-action {
    min-height: 52px;
    font-size: 15px;
  }
}


.floating-left,
.floating-right {
  display: none !important;
}