* {
  box-sizing: border-box;
}

:root {
  --orange: #ff5b2e;
  --orange-dark: #f14b1d;
  --green: #2ecc71;
  --blue: #3f6fe8;
  --zalo: #0a8cff;
  --text: #1f2937;
  --muted: #6b7280;
  --light: #f3f4f6;
  --white: #ffffff;
  --border: #dbe1ea;
  --danger-border: #ef5d35;
  --bg1: #f5c2b1;
  --bg2: #f8d3c7;
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.08);
  --shadow-btn: 0 8px 18px rgba(255, 91, 46, 0.22);
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
a {
  font-family: inherit;
}

.page-bg {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(circle at top center, rgba(255,255,255,0.35), transparent 35%),
    linear-gradient(180deg, #f4bfad 0%, #f5cdc1 100%);
}

.phone-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  padding: 16px 14px 30px;
  background: transparent;
}

/* HERO */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 4px 14px;
  text-align: left;
}

.hero-left {
  flex: 0 0 auto;
}

.hero-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
}

.hero-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff744d 0%, #ff4e20 100%);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 10px 22px rgba(255, 91, 46, 0.22);
}

.hero h1 {
  margin: 0;
  color: var(--orange);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.domain-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: #ff6b43;
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
}

/* CARD */
.card {
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 16px;
}

.glass-card {
  background: rgba(245, 247, 250, 0.85);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.section-title,
.guide-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  font-size: 18px;
}

/* INPUT */
.input-row {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-row:focus-within {
  border-color: #ff9b7e;
  box-shadow: 0 0 0 4px rgba(255, 91, 46, 0.12);
}

.input-row input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 16px 14px;
  font-size: 15px;
  color: #374151;
  background: transparent;
}

.input-row input::placeholder {
  color: #9ca3af;
}

.icon-btn {
  width: 56px;
  border: none;
  border-left: 1px solid #eceff4;
  background: #fafbfc;
  cursor: pointer;
  font-size: 19px;
  color: #374151;
  transition: background 0.15s ease, transform 0.15s ease;
}

.icon-btn:hover {
  background: #f3f4f6;
}

.icon-btn:active {
  transform: scale(0.98);
}

/* BUTTON */
.btn {
  border: none;
  cursor: pointer;
  border-radius: 16px;
  font-weight: 800;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover {
  opacity: 0.97;
}

.btn:active {
  transform: scale(0.99);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.btn-big {
  width: 100%;
  margin-top: 14px;
  min-height: 56px;
  font-size: 19px;
}

.btn-small {
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-shadow {
  box-shadow: var(--shadow-btn);
}

.btn-orange {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: var(--white);
}

.btn-green {
  background: linear-gradient(135deg, #38d77d 0%, #21b862 100%);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(46, 204, 113, 0.23);
}

.btn-blue {
  background: linear-gradient(135deg, #4c7bf1 0%, #355fce 100%);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(63, 111, 232, 0.23);
}

.btn-zalo {
  background: linear-gradient(135deg, #18a0ff 0%, #0079ff 100%);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(10, 140, 255, 0.23);
}

.disabled-link {
  pointer-events: none;
  opacity: 0.72;
}

/* RESULT */
.result-box {
  border: 3px solid var(--danger-border);
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fff8f6 100%);
}

.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.result-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #1f3b63;
  font-size: 16px;
  font-weight: 800;
}

.coupon-note {
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 700;
}

.result-label i {
  color: #1db954;
  margin-top: 2px;
}

.result-text {
  margin: 0;
  color: #374151;
  line-height: 1.65;
  font-size: 14px;
  word-break: break-all;
  min-height: 72px;
  background: #fff;
  padding: 8px 2px 0;
}

.empty-result {
  color: #9ca3af;
}

/* ACTION ROW */
.action-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.btn-mini {
  width: 100%;
  min-height: 44px;
  margin-top: 0;
  font-size: 15px;
  padding: 0 10px;
  border-radius: 14px;
}

.btn-mini span {
  white-space: nowrap;
}

/* GUIDE */
.guide-title i {
  color: #2563eb;
}

.guide-list {
  margin: 10px 0 18px 24px;
  padding: 0;
  font-size: 15.5px;
  line-height: 1.85;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fb-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid #2563eb;
  color: #2563eb;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  background: #ffffff;
  transition: transform 0.15s ease, background 0.15s ease;
}

.fb-link:hover {
  background: #f8fbff;
}

.fb-link:active {
  transform: scale(0.99);
}

/* TOAST */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(17, 24, 39, 0.94);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 9999;
  max-width: calc(100vw - 32px);
  text-align: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* DESKTOP */
@media (min-width: 768px) {
  .page-bg {
    padding: 24px;
  }

  .phone-shell {
    border-radius: 30px;
    min-height: auto;
  }
}

/* MOBILE SMALL */
@media (max-width: 420px) {
  .hero {
    gap: 10px;
    padding: 6px 2px 12px;
  }

  .hero-logo {
    width: 48px;
    height: 48px;
    font-size: 20px;
    border-radius: 14px;
  }

  .hero h1 {
    font-size: 18px;
  }

  .domain-pill {
    font-size: 12px;
    padding: 7px 12px;
  }

  .section-title,
  .guide-title,
  .result-label {
    font-size: 16px;
  }

  .guide-list {
    font-size: 15px;
  }

  .action-row {
    gap: 8px;
  }

  .btn-mini {
    min-height: 40px;
    font-size: 13px;
    padding: 0 8px;
  }
}