/* Nuvio / Stremio VIP installer & guide theme */
:root {
  --vip-bg-deep: #0a0614;
  --vip-bg-mid: #120520;
  --vip-purple: #a855f7;
  --vip-purple-soft: rgba(168, 85, 247, 0.22);
  --vip-purple-glow: rgba(168, 85, 247, 0.45);
  --vip-gold: #d4af37;
  --vip-gold-bright: #fde047;
  --vip-gold-soft: rgba(250, 204, 21, 0.18);
  --vip-panel: rgba(18, 10, 32, 0.88);
  --vip-card: rgba(255, 255, 255, 0.04);
  --vip-card-border: rgba(255, 255, 255, 0.1);
  --vip-text: #f3f0ff;
  --vip-text-dim: #b8afc9;
  --vip-radius: 18px;
  --vip-radius-lg: 26px;
  --bg: var(--vip-bg-deep);
  --panel: var(--vip-panel);
  --panel-strong: var(--vip-card);
  --panel-border: var(--vip-card-border);
  --text: var(--vip-text);
  --text-dim: var(--vip-text-dim);
  --accent: var(--vip-purple);
  --accent-2: #7c3aed;
  --success: #22c55e;
  --danger: #ef4444;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  --radius: var(--vip-radius);
}

* { box-sizing: border-box; }

body.vip-body,
body {
  background-color: var(--vip-bg-deep);
  background-image:
    radial-gradient(900px 500px at 12% 18%, rgba(168, 85, 247, 0.22), transparent 58%),
    radial-gradient(700px 420px at 88% 12%, rgba(212, 175, 55, 0.14), transparent 55%),
    radial-gradient(600px 380px at 50% 100%, rgba(124, 58, 237, 0.16), transparent 60%),
    linear-gradient(180deg, #0f0820 0%, #0a0614 45%, #120820 100%);
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--vip-text);
  position: relative;
  overflow-x: hidden;
}

body.vip-body::before,
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.07), transparent 42%),
    radial-gradient(circle at 82% 22%, rgba(168, 85, 247, 0.12), transparent 48%);
  pointer-events: none;
  z-index: 0;
}

.vip-page-wrap,
.container.vip-page-wrap {
  position: relative;
  z-index: 1;
  padding-top: 36px;
  padding-bottom: 28px;
}

/* Gradient glowing frame */
.vip-frame {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 2px;
  border-radius: 30px;
  background: linear-gradient(
    180deg,
    rgba(168, 85, 247, 0.95) 0%,
    rgba(168, 85, 247, 0.35) 28%,
    rgba(212, 175, 55, 0.28) 72%,
    rgba(250, 204, 21, 0.9) 100%
  );
  box-shadow:
    0 0 48px rgba(168, 85, 247, 0.28),
    0 0 72px rgba(250, 204, 21, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.45);
}

.vip-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 31px;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 40%, rgba(255,255,255,0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.main-container,
.vip-frame-inner,
.guide-container.vip-frame-inner {
  background: linear-gradient(180deg, rgba(14, 8, 28, 0.96) 0%, rgba(10, 6, 20, 0.98) 100%);
  border-radius: 28px;
  backdrop-filter: blur(18px);
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  margin: 0;
  padding: 28px 26px 20px;
  max-width: none;
}

/* Brand header */
.vip-brand,
.header.vip-brand {
  text-align: center;
  margin-bottom: 22px;
  padding-bottom: 4px;
}

.vip-brand-crown {
  display: block;
  font-size: 1.35rem;
  color: var(--vip-gold-bright);
  margin-bottom: 2px;
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.45));
}

.vip-brand h1,
.header.vip-brand h1,
.vip-brand-title {
  font-size: clamp(1.85rem, 5vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
  background: linear-gradient(180deg, #fff7cc 0%, #facc15 42%, #d4af37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 14px rgba(250, 204, 21, 0.25));
}

.vip-brand p,
.header.vip-brand p {
  color: var(--vip-text-dim);
  font-size: 0.95rem;
  margin: 0;
}

/* Back pill */
.vip-back-row {
  text-align: center;
  margin-bottom: 14px;
}

.btn.vip-back-pill,
.vip-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--vip-text);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn.vip-back-pill:hover,
.vip-back-pill:hover {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

/* Section cards */
.form-section,
.vip-section-card {
  background: var(--vip-card);
  border-radius: var(--vip-radius);
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--vip-card-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-section > h5,
.form-section > h6,
.vip-section-card > h5 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 800;
  color: #ede9fe;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.form-section > h5 i,
.form-section > h6 i,
.vip-section-card > h5 i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.view-section { display: none; }
.view-section.active { display: block; }

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}
.home-actions.vertical-only {
  flex-direction: column !important;
  align-items: center;
}
.home-actions .btn {
  padding: 14px 36px;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 14px;
}
@media (min-width: 768px) {
  .home-actions { flex-direction: row; }
  .home-actions .btn { flex: 1; }
  .home-actions.vertical-only { flex-direction: column !important; }
  .home-actions.vertical-only .btn { flex: initial; }
}
.home-actions.vertical-only .btn {
  width: 100%;
  max-width: 360px;
}

.form-label {
  font-weight: 600;
  color: var(--vip-text);
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.form-control {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: var(--vip-text) !important;
  padding: 12px 14px;
  font-size: 1rem;
  caret-color: var(--vip-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input.form-control,
textarea.form-control,
select.form-control {
  color: var(--vip-text) !important;
  -webkit-text-fill-color: var(--vip-text) !important;
}

.form-control option {
  color: #111827;
  background: #ffffff;
}

.form-control:focus {
  border-color: rgba(168, 85, 247, 0.75);
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 0 0 0.2rem rgba(168, 85, 247, 0.22);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.form-control:read-only,
.form-control[readonly],
.form-control:disabled {
  background: rgba(0, 0, 0, 0.28) !important;
  color: var(--vip-text) !important;
  -webkit-text-fill-color: var(--vip-text) !important;
  opacity: 1;
  cursor: default;
}

.form-control.is-valid,
.was-validated .form-control:valid {
  border-color: rgba(34, 197, 94, 0.65) !important;
  background: rgba(34, 197, 94, 0.1) !important;
  color: var(--vip-text) !important;
  -webkit-text-fill-color: var(--vip-text) !important;
  background-image: none !important;
  padding-left: 14px;
  padding-right: 14px;
}

.form-control.is-invalid,
.was-validated .form-control:invalid {
  border-color: rgba(239, 68, 68, 0.65) !important;
  background: rgba(239, 68, 68, 0.1) !important;
  color: var(--vip-text) !important;
  -webkit-text-fill-color: var(--vip-text) !important;
  background-image: none !important;
}

input.form-control:-webkit-autofill,
input.form-control:-webkit-autofill:hover,
input.form-control:-webkit-autofill:focus,
textarea.form-control:-webkit-autofill,
select.form-control:-webkit-autofill {
  -webkit-text-fill-color: var(--vip-text) !important;
  caret-color: var(--vip-text);
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.35) inset !important;
  transition: background-color 9999s ease-in-out 0s;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.nuvio-email-connected .form-control,
.nuvio-email-connected .form-control:read-only,
.nuvio-email-connected .form-control[readonly] {
  border-color: rgba(34, 197, 94, 0.65) !important;
  box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.18) !important;
  background: rgba(34, 197, 94, 0.1) !important;
  color: var(--vip-text) !important;
  -webkit-text-fill-color: var(--vip-text) !important;
}

/* Buttons */
.btn-gold,
.btn-vip-cta {
  background: linear-gradient(135deg, #fde047 0%, #facc15 38%, #d4af37 100%);
  border: none;
  color: #1a1028;
  font-weight: 800;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-gold:hover,
.btn-vip-cta:hover {
  background: linear-gradient(135deg, #fef08a 0%, #fde047 45%, #eab308 100%);
  color: #0f0a18;
  box-shadow: 0 16px 34px rgba(250, 204, 21, 0.42);
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(168, 85, 247, 0.32);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(168, 85, 247, 0.42);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 22px;
  font-weight: 600;
  color: var(--vip-text);
}

.btn-secondary:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.35);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 10px 22px rgba(34, 197, 94, 0.28);
}

.btn-outline-secondary,
.btn-outline-primary {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--vip-text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-outline-secondary:hover,
.btn-outline-primary:hover {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.4);
  color: #fff;
}

/* Toggles & radios */
.form-check-input:checked {
  background-color: var(--vip-purple);
  border-color: var(--vip-purple);
}

.option-toggle-button,
.toggle-group .form-check-label {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
}

.option-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-toggle-button {
  display: block;
  cursor: pointer;
  border-radius: 12px;
  padding: 12px 12px 12px 44px !important;
  text-align: right;
  transition: all 0.2s ease;
}

.option-toggle-button strong {
  color: #ede9fe;
}

.option-toggle-button::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.option-toggle-input:checked + .option-toggle-button,
.toggle-group .form-check-input:checked + .form-check-label {
  border-color: rgba(168, 85, 247, 0.85);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.18);
  background: rgba(168, 85, 247, 0.12);
}

.option-toggle-input:checked + .option-toggle-button::after,
.toggle-group .form-check-input:checked + .form-check-label::after {
  content: "✓";
  background: rgba(168, 85, 247, 0.35);
  border-color: rgba(216, 180, 254, 0.75);
  color: #f3e8ff;
}

.toggle-group .form-check {
  position: relative;
  margin-bottom: 10px;
}

.toggle-group .form-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-group .form-check-label {
  display: block;
  cursor: pointer;
  padding: 10px 12px 10px 42px;
  position: relative;
  transition: all 0.2s ease;
}

.toggle-group .form-check-label::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

/* Version footer */
.installer-version-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(250, 204, 21, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.installer-version-footer .installer-version-label {
  font-size: 0.82rem;
  color: var(--vip-gold-bright);
  font-weight: 700;
}

.installer-version-footer .installer-version-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--vip-gold-bright);
  direction: ltr;
  text-shadow: 0 0 18px rgba(250, 204, 21, 0.25);
}

.installer-version-footer .installer-version-date {
  font-size: 0.78rem;
  color: var(--vip-text-dim);
  direction: ltr;
}

.user-version-panel {
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.1);
  padding: 14px 16px;
  margin-top: 12px;
  text-align: center;
}

.flash {
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
}
.flash.ok {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}
.flash.error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.note, .muted, .text-muted {
  color: var(--vip-text-dim);
}

.vip-install-footer {
  text-align: center;
  margin-top: 18px;
}

.vip-install-footer .btn-vip-cta {
  width: 100%;
  max-width: 420px;
  padding: 15px 24px;
  font-size: 1.08rem;
}

.vip-install-hint {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--vip-text-dim);
}

/* ========== Guide page ========== */
.guide-page .vip-frame {
  max-width: 1000px;
}

.guide-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.main-guide-switch {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.main-switch-button {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  background: rgba(0, 0, 0, 0.35);
  color: var(--vip-text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.main-switch-button:hover,
.main-switch-button.active {
  border-color: rgba(250, 204, 21, 0.65);
  background: rgba(168, 85, 247, 0.12);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.15);
}

.guide-choice-note {
  text-align: center;
  color: var(--vip-text-dim);
  margin-bottom: 16px;
}

.guide-mode { display: none; }
.guide-mode.active { display: block; }

.platform-button {
  width: 100%;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--vip-text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.platform-button:hover,
.platform-button.active {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.12);
}

.platform-section {
  display: none;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.25s ease;
}

.platform-section.active {
  display: block;
  max-height: 6000px;
  opacity: 1;
  margin-bottom: 16px;
}

.platform-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ede9fe;
}

.step {
  margin-bottom: 16px;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 3px solid rgba(168, 85, 247, 0.65);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  margin-left: 12px;
  vertical-align: middle;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f3e8ff;
}

.step-content {
  margin-top: 12px;
  line-height: 1.75;
  color: var(--vip-text-dim);
}

.highlight {
  color: var(--vip-gold-bright);
  font-weight: 700;
}

.warning-box,
.info-box {
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.warning-box {
  background: rgba(168, 85, 247, 0.1);
  border-right: 3px solid var(--vip-purple);
}

.info-box {
  background: rgba(250, 204, 21, 0.08);
  border-right: 3px solid var(--vip-gold);
}

.code-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px;
  font-family: "Courier New", monospace;
  direction: ltr;
  text-align: center;
}

.download-link,
.back-button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.download-link {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #f3e8ff;
  margin: 8px 4px;
}

.download-link:hover {
  background: rgba(168, 85, 247, 0.32);
  color: #fff;
  transform: translateY(-1px);
}

.back-button {
  margin-top: 24px;
  background: linear-gradient(135deg, #fde047, #d4af37);
  color: #1a1028;
  border: none;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(250, 204, 21, 0.3);
  color: #0f0a18;
}

.user-version-panel .user-version-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #e9d5ff;
}

.user-version-panel .user-version-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  align-items: center;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.user-version-panel .user-version-row strong {
  direction: ltr;
  display: inline-block;
}

.user-version-panel .user-version-note {
  font-size: 0.88rem;
  margin-top: 4px;
  color: var(--vip-text-dim);
}

.user-version-panel .user-version-note.is-update {
  color: #fcd34d;
  font-weight: 700;
}

.user-version-panel .user-version-note.is-ok {
  color: #86efac;
  font-weight: 600;
}

.user-version-panel .user-version-note.is-fresh {
  color: #93c5fd;
  font-weight: 600;
}

@media (max-width: 768px) {
  .vip-frame {
    border-radius: 22px;
    margin: 0 8px;
  }
  .main-container,
  .vip-frame-inner,
  .guide-container.vip-frame-inner {
    border-radius: 20px;
    padding: 20px 16px 16px;
  }
  .main-guide-switch {
    flex-direction: column;
  }
}
