/* scast.css - Bang mau that cua app SCAST (Luminescent Cast) */

:root {
  --nen: #0B1220;
  --nen-phu: #0F1727;
  --the: #131C2E;
  --the-cao: #1A263D;
  --chu-chinh: #F1F5F9;
  --chu-phu: #CBD5E1;
  --chu-mo: #94A3B8;
  --nhan: #22C3A6;
  --nhan-sang: #5EEAD4;
  --xanh: #3D8BFF;
  --xanh-sang: #60A5FA;
  --tim: #8B7CFF;
  --cam: #FB923C;
  --xanh-la: #34D399;
  --do: #EF4444;
  --vien: #233352;
  --vien-sang: #334B75;
  --bong: 0 8px 28px rgba(0, 0, 0, 0.35);

  --bk-nut: 999px;
  --bk-nho: 14px;
  --bk-the: 20px;
  --bk-lon: 28px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  background-color: var(--nen);
  color: var(--chu-chinh);
  line-height: 1.65;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--nhan-sang);
  outline-offset: 4px;
}

h1, h2, h3, h4 {
  color: var(--chu-chinh);
  margin-top: 0;
  margin-bottom: 16px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.85rem, 6vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 4.5vw, 1.9rem); }
h3 { font-size: 1.2rem; margin-bottom: 8px; }

p {
  color: var(--chu-phu);
  margin-top: 0;
  margin-bottom: 16px;
}

a {
  color: var(--nhan-sang);
  text-decoration: none;
}

a:hover {
  color: #99F6E4;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  color: var(--chu-phu);
  margin-top: 0;
  margin-bottom: 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

strong, b {
  color: var(--chu-chinh);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--the-cao);
  color: var(--nhan-sang);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--vien);
}

/* Bo cuc chung */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}

.section {
  padding: 60px 0;
}

.section.container {
  padding-left: 18px;
  padding-right: 18px;
}

/* Bo qua toi noi dung */
.bo-qua {
  position: absolute;
  top: -120px;
  left: 16px;
  background: var(--the-cao);
  color: var(--chu-chinh);
  padding: 12px 18px;
  border-radius: var(--bk-nho);
  border: 1px solid var(--nhan);
  z-index: 1000;
  transition: top 0.2s;
}

.bo-qua:focus {
  top: 16px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background-color: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--vien);
  z-index: 100;
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--chu-chinh);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.logo-group:hover {
  text-decoration: none;
  color: var(--nhan-sang);
}

.logo-img {
  height: 36px;
  width: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  color: var(--chu-chinh);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 4px;
}

.nav-links a:hover {
  color: var(--nhan-sang);
  text-decoration: none;
}

.nav-links a.lang-switch {
  background: var(--the-cao);
  border: 1px solid var(--vien-sang);
  padding: 6px 14px;
  border-radius: var(--bk-nut);
  color: var(--nhan-sang);
}

.nav-links a.lang-switch:hover {
  background: var(--vien);
  color: #FFFFFF;
}

/* Hero */
.hero {
  padding: 64px 0 56px;
  background: radial-gradient(circle at 80% 20%, rgba(61, 139, 255, 0.14), transparent 45%),
              radial-gradient(circle at 20% 80%, rgba(34, 195, 166, 0.12), transparent 45%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 800px) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero-badge {
  display: inline-block;
  background: var(--the-cao);
  color: var(--nhan-sang);
  border: 1px solid var(--vien-sang);
  border-radius: var(--bk-nut);
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-content p {
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.nut-nhom {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: var(--bk-nut);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  min-height: 48px;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  transition: transform 0.15s, background-color 0.15s;
}

.nut:hover {
  text-decoration: none;
}

.nut-chinh {
  background: linear-gradient(135deg, var(--xanh), var(--nhan));
  color: #0B1220;
}

.nut-chinh:hover {
  background: linear-gradient(135deg, var(--xanh-sang), var(--nhan-sang));
  color: #0B1220;
}

.nut-phu {
  background: var(--the-cao);
  color: var(--chu-chinh);
  border: 1px solid var(--vien-sang);
}

.nut-phu:hover {
  background: var(--vien);
  color: #FFFFFF;
}

/* Khung dien thoai */
.dien-thoai {
  border: 4px solid var(--vien-sang);
  border-radius: 28px;
  overflow: hidden;
  background: var(--the);
  aspect-ratio: 1 / 2;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  box-shadow: var(--bong);
}

.dien-thoai img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The chung */
.the {
  background: var(--the);
  border: 1px solid var(--vien);
  border-radius: var(--bk-the);
  padding: 24px;
  box-shadow: var(--bong);
}

.the-nhan-mirror {
  border-top: 3px solid var(--nhan);
}

.the-nhan-remote {
  border-top: 3px solid var(--tim);
}

.the-nhan-xanh {
  border-top: 3px solid var(--xanh);
}

/* Luoi 3 cot */
.luoi-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .luoi-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Luoi 2 cot */
.luoi-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .luoi-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Cau truc phan tinh nang co anh */
.tinh-nang-lon {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 768px) {
  .tinh-nang-lon {
    grid-template-columns: 1.15fr 0.85fr;
  }
  .tinh-nang-lon.nguoc {
    direction: rtl;
  }
  .tinh-nang-lon.nguoc > * {
    direction: ltr;
  }
}

.khoi-phu {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--vien);
}

/* Luoi 4 cot cho danh sach tinh nang / TV */
.luoi-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .luoi-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .luoi-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.the-nho {
  background: var(--the);
  border: 1px solid var(--vien);
  border-radius: var(--bk-the);
  padding: 18px;
  box-shadow: var(--bong);
}

.the-nho h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--nhan-sang);
}

.the-nho p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

/* Nhan trang thai TV ho tro */
.nhan-tv {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--bk-nut);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nhan-tot {
  background: rgba(52, 211, 153, 0.16);
  color: var(--xanh-la);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.nhan-mot-phan {
  background: rgba(251, 146, 60, 0.16);
  color: var(--cam);
  border: 1px solid rgba(251, 146, 60, 0.4);
}

.nhan-khong {
  background: rgba(239, 68, 68, 0.16);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Ghi chu */
.ghi-chu {
  background: var(--the-cao);
  border-left: 4px solid var(--nhan);
  padding: 14px 18px;
  border-radius: 0 var(--bk-nho) var(--bk-nho) 0;
  margin: 16px 0;
}

.ghi-chu p:last-child {
  margin-bottom: 0;
}

/* Bang icon / thong tin */
.bang-khung {
  overflow-x: auto;
  margin: 16px 0 28px;
  border: 1px solid var(--vien);
  border-radius: var(--bk-nho);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--the);
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--vien);
  vertical-align: top;
}

th {
  background: var(--the-cao);
  color: var(--chu-chinh);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

/* Footer */
.footer {
  background: var(--nen-phu);
  padding: 40px 0;
  border-top: 1px solid var(--vien);
  text-align: center;
  color: var(--chu-phu);
}

.footer a {
  padding: 8px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 16px 0;
  flex-wrap: wrap;
}

/* Nut menu tren man hinh nho */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--the-cao);
  border: 1px solid var(--vien-sang);
  border-radius: var(--bk-nho);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--chu-chinh);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 18px;
    right: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--the);
    border: 1px solid var(--vien-sang);
    border-radius: var(--bk-the);
    box-shadow: var(--bong);
    padding: 12px;
  }

  .nav-links.mo { display: flex; }

  .nav-links a {
    padding: 12px 14px;
    border-radius: var(--bk-nho);
  }

  .nav-links a:hover {
    background: var(--the-cao);
  }
}

/* Trang docs */
.docs-container {
  margin-top: 32px;
  margin-bottom: 48px;
  max-width: 880px;
  overflow-wrap: anywhere;
}

.docs-container h1 {
  font-size: clamp(1.5rem, 6vw, 2.3rem);
}

.docs-container section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--vien);
}

.docs-container section:first-of-type {
  border-top: none;
  margin-top: 0;
}

.docs-container img {
  max-width: 300px;
  display: block;
  margin: 20px auto;
  border-radius: 20px;
  border: 3px solid var(--vien-sang);
}

.toc {
  margin: 20px 0 28px;
  background: var(--the-cao);
  border: 1px solid var(--vien-sang);
  padding: 18px 22px;
  border-radius: var(--bk-the);
}

.toc h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.toc ul {
  margin-bottom: 0;
}

.toc a.active {
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: underline;
}

/* === REAL IPHONE 15 PRO TITANIUM MOCKUP FRAME (ZERO HORIZONTAL SQUISH) === */
.dien-thoai {
  position: relative;
  border: 11px solid #16181d !important;
  border-radius: 48px !important;
  overflow: hidden !important;
  background: #0d0f12 !important;
  aspect-ratio: auto !important;
  width: 100%;
  max-width: 312px !important;
  margin: 0 auto;
  box-shadow:
    0 0 0 1.5px #4b5262,
    0 0 0 3.5px #1e222a,
    0 24px 52px -10px rgba(15, 23, 42, 0.34),
    0 8px 20px -4px rgba(15, 23, 42, 0.20) !important;
  isolation: isolate;
}

/* Dynamic Island pill */
.dien-thoai::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 23px;
  background: #050608;
  border-radius: 999px;
  z-index: 25;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.45);
  background-image: radial-gradient(circle at 74px 11.5px, #1d2b44 0%, #0d1322 3.5px, #050608 4.5px);
}

/* iOS Home Indicator bar */
.dien-thoai::after {
  content: "";
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 4.5px;
  background: rgba(120, 130, 145, 0.65);
  border-radius: 999px;
  z-index: 25;
  pointer-events: none;
}

.dien-thoai img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 36px !important;
  display: block;
}

/* Side-by-side pair of phones (.cap-doi): stack on narrow screens, wider container on desktop so neither phone gets squeezed */
.cap-doi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(236px, 1fr)) !important;
  gap: 20px !important;
  align-items: start;
}

.cap-doi .dien-thoai {
  max-width: 268px !important;
  border-width: 10px !important;
  border-radius: 44px !important;
}
.cap-doi .dien-thoai::before {
  top: 9px;
  width: 74px;
  height: 20px;
  background-image: radial-gradient(circle at 63px 10px, #1d2b44 0%, #0d1322 3px, #050608 4px);
}
.cap-doi .dien-thoai img {
  border-radius: 33px !important;
}
