:root {
  --gold: #d4af37;
  --gold-light: #f0d060;
  --gold-dark: #a8892a;
  --purple: #1a0a2e;
  --purple-mid: #2d1b4e;
  --purple-light: #3d2a6e;
  --text: #f0ece4;
  --text-muted: #a89ec0;
  --success: #4ade80;
  --card-bg: rgba(45, 27, 78, 0.6);
  --border: rgba(212, 175, 55, 0.25);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--purple);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(212, 175, 55, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(61, 42, 110, 0.5), transparent);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ── Header ── */
header {
  padding: 28px 0 12px;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

header .logo {
  text-align: left;
}

.btn-tv-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a0a2e;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-tv-live:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.45);
}

.btn-hero-live {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 28px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-hero-live:hover {
  background: rgba(212, 175, 55, 0.25);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
}

.logo-text h1 {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.logo-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 32px 0 40px;
}

.hero h2 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 10px;
}

.hero p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 28px;
  font-size: 0.95rem;
}

/* ── M3U Card ── */
.m3u-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.m3u-card h3 {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.m3u-card .subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.url-box {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.url-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--gold-light);
  font-size: 0.82rem;
  font-family: "Courier New", monospace;
  word-break: break-all;
  outline: none;
  transition: border-color 0.2s;
}

.url-input:focus {
  border-color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--purple);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.45);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gold);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.08);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.copy-toast {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 8px;
  color: var(--success);
  font-size: 0.85rem;
  margin-top: 12px;
  animation: fadeIn 0.3s ease;
}

.copy-toast.show {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Credentials Grid ── */
.creds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.cred-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.cred-item label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cred-item span {
  font-family: "Courier New", monospace;
  font-size: 0.88rem;
  color: var(--gold-light);
  word-break: break-all;
}

.cred-item .copy-mini {
  float: right;
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.cred-item .copy-mini:hover {
  opacity: 1;
}

/* ── Device Tabs ── */
.section-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gold);
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--purple);
  border-color: transparent;
  font-weight: 600;
}

.tab-panel {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

.tab-panel h4 {
  color: var(--gold);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.steps {
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 0 12px 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
}

.steps li:last-child {
  border-bottom: none;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 28px;
  height: 28px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
}

.steps li strong {
  color: var(--gold-light);
}

.app-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 0.82rem;
  color: var(--gold-light);
  font-weight: 600;
}

/* ── Features ── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 40px 0;
}

.feature {
  text-align: center;
  padding: 20px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature .icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.feature h5 {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.feature p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Contact ── */
.contact {
  text-align: center;
  padding: 32px 0 48px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.contact-links a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 175, 55, 0.06);
}

footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
}

@media (max-width: 600px) {
  .url-box {
    flex-direction: column;
  }

  .btn-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
