/* --- Điều khoản & chính sách bảo mật (overlay trong index.html) — sau style.css --- */

.terms-view {
  position: fixed;
  inset: 0;
  z-index: 3000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-page);
  background-image: linear-gradient(
    180deg,
    #ffffff 0%,
    var(--bg-page) 22%,
    var(--bg-page-mid) 100%
  );
  background-attachment: local;
}

.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(225, 29, 72, 0.1);
  box-shadow: 0 4px 24px rgba(131, 24, 67, 0.06);
}

.legal-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-bottom: 16px;
}

.legal-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: var(--transition);
}

.legal-logo:hover .logo-img {
  opacity: 0.88;
}

.legal-logo .logo-img {
  display: block;
  height: auto;
  width: auto;
  max-height: 74px;
  max-width: min(400px, 82vw);
  object-fit: contain;
  flex-shrink: 0;
}

.btn-legal-back {
  border: 1px solid rgba(225, 29, 72, 0.28);
  color: var(--primary);
  background: rgba(255, 255, 255, 0.95);
  padding: 11px 20px;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-legal-back:hover {
  border-color: var(--primary);
  background: linear-gradient(
    135deg,
    #be123c 0%,
    var(--primary) 45%,
    #7c3aed 100%
  );
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.35);
}

.btn-legal-back svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.25px;
  flex-shrink: 0;
}

.legal-main {
  padding: clamp(32px, 6vw, 56px) 0 88px;
}

.legal-doc {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border-radius: 22px;
  padding: clamp(28px, 5vw, 48px) clamp(22px, 4vw, 44px);
  box-shadow:
    0 16px 56px rgba(131, 24, 67, 0.07),
    0 0 0 1px rgba(225, 29, 72, 0.06);
}

.legal-doc h1 {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.2vw, 2.15rem);
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.legal-meta {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(225, 29, 72, 0.12);
}

.legal-doc section {
  margin-bottom: 26px;
}

.legal-doc section:last-of-type {
  margin-bottom: 0;
}

.legal-doc h2 {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.35;
}

.legal-doc p {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 0.97rem;
}

.legal-doc p:last-child {
  margin-bottom: 0;
}

.legal-doc h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin: 18px 0 10px;
  line-height: 1.35;
}

.legal-doc h3:first-child {
  margin-top: 0;
}

.legal-doc ul {
  margin: 0 0 14px;
  padding-left: 1.35em;
  color: var(--ink);
  font-size: 0.97rem;
}

.legal-doc li {
  margin-bottom: 8px;
}

.legal-doc li:last-child {
  margin-bottom: 0;
}

.legal-doc a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(225, 29, 72, 0.35);
  transition: var(--transition);
}

.legal-doc a:hover {
  color: #9f1239;
  border-bottom-color: rgba(159, 18, 57, 0.5);
}

@media (max-width: 1024px) {
  .legal-logo .logo-img {
    max-height: 56px;
    max-width: min(280px, 66vw);
  }
}

@media (max-width: 639px) {
  .legal-logo .logo-img {
    max-height: 38px;
    max-width: min(152px, 52vw);
  }

  .btn-legal-back {
    padding: 9px 14px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-legal-back:hover {
    transform: none;
  }
}

/* --- Trang liên hệ (#lien-he) — overlay cùng hệ với điều khoản --- */

.contact-view {
  background-image:
    radial-gradient(
      ellipse 120% 80% at 50% -20%,
      rgba(225, 29, 72, 0.14),
      transparent 55%
    ),
    radial-gradient(
      ellipse 70% 50% at 100% 40%,
      rgba(124, 58, 237, 0.1),
      transparent 50%
    ),
    linear-gradient(
      180deg,
      #fffafc 0%,
      var(--bg-page) 28%,
      var(--bg-page-mid) 100%
    );
}

.contact-main {
  padding-top: clamp(24px, 4vw, 40px);
}

.contact-shell {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(8px, 2vw, 16px) 0 96px;
}

.contact-shell-glow {
  position: absolute;
  inset: -8% -12% auto;
  height: min(420px, 55vh);
  background: radial-gradient(
    closest-side,
    rgba(225, 29, 72, 0.12),
    rgba(192, 132, 252, 0.08) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.contact-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: clamp(28px, 5vw, 40px);
}

.contact-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
  opacity: 0.92;
}

.contact-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.contact-hero-lead {
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  color: var(--ink-muted);
  line-height: 1.65;
  max-width: 34em;
  margin: 0 auto;
}

.contact-channel-list {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(225, 29, 72, 0.1);
  box-shadow:
    0 4px 24px rgba(131, 24, 67, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.contact-channel:hover {
  border-color: rgba(225, 29, 72, 0.28);
  box-shadow:
    0 14px 40px rgba(225, 29, 72, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.95) inset;
  transform: translateY(-3px);
}

.contact-channel:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.contact-channel-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    145deg,
    rgba(225, 29, 72, 0.12),
    rgba(192, 132, 252, 0.1)
  );
  color: var(--primary);
}

.contact-channel-icon svg.lucide {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2px;
  fill: none;
}

.contact-inline-svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

.contact-channel--mail .contact-channel-icon {
  background: linear-gradient(145deg, #fce7f3, #fdf4ff);
  color: #be185d;
}

.contact-channel--fb .contact-channel-icon {
  background: linear-gradient(145deg, #dbeafe, #eff6ff);
  color: #1877f2;
}

.contact-channel-icon--zalo {
  background: linear-gradient(145deg, #dbeafe, #e0f2fe) !important;
  color: #0068ff;
}

.contact-zalo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.contact-channel--tiktok .contact-channel-icon {
  background: linear-gradient(145deg, #fce7f3, #fae8ff);
  color: #ec4899;
}

.contact-channel--github .contact-channel-icon {
  background: linear-gradient(145deg, #f4f4f5, #e4e4e7);
  color: #18181b;
}

.contact-channel-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-channel-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}

.contact-channel-desc {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.contact-channel-arrow {
  flex-shrink: 0;
  color: rgba(225, 29, 72, 0.45);
  transition: var(--transition);
}

.contact-channel-arrow svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.25px;
}

.contact-channel:hover .contact-channel-arrow {
  color: var(--primary);
  transform: translate(3px, -3px);
}

.contact-response {
  position: relative;
  z-index: 1;
  margin-top: clamp(32px, 6vw, 44px);
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(225, 29, 72, 0.35),
    rgba(124, 58, 237, 0.25),
    rgba(225, 29, 72, 0.2)
  );
}

.contact-response-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: clamp(22px, 4vw, 28px) clamp(20px, 4vw, 28px);
  border-radius: 19px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(253, 248, 250, 0.97) 100%
  );
}

.contact-response-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(225, 29, 72, 0.15),
    rgba(124, 58, 237, 0.12)
  );
  color: var(--primary);
}

.contact-response-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.25px;
}

.contact-response-text h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.contact-response-text p {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 12px;
}

.contact-response-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 639px) {
  .contact-channel {
    padding: 16px 16px;
    gap: 14px;
  }

  .contact-channel-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .contact-response-inner {
    flex-direction: column;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-channel:hover,
  .contact-channel:hover .contact-channel-arrow {
    transform: none;
  }
}
