/* DealSmartPlayer — Activation Portal
   Premium dark UI: glass surfaces, aurora gradients, neon focus states. */

:root {
  --bg: #050816;
  --bg-soft: #0a0f2b;
  --ink: #eef1ff;
  --ink-dim: #aeb5db;
  --ink-mute: #7b83b8;
  --violet: #a829ff;
  --blue: #267eff;
  --cyan: #43ddff;
  --green: #24e48f;
  --red: #ff5c91;
  --line: rgba(120, 135, 255, .16);
  --glass: rgba(13, 18, 48, .66);
  --glass-strong: rgba(10, 14, 43, .92);
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 5, .55);
  --grad: linear-gradient(100deg, #a829ff, #267eff 55%, #43ddff);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------------------------------------------------------- aurora bg */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5; }
.aurora-a { width: 46vw; height: 46vw; left: -12vw; top: -18vw; background: radial-gradient(circle, #4a1fb8, transparent 65%); animation: drift 26s ease-in-out infinite alternate; }
.aurora-b { width: 40vw; height: 40vw; right: -10vw; top: -6vw; background: radial-gradient(circle, #123f9e, transparent 65%); animation: drift 32s ease-in-out infinite alternate-reverse; }
.aurora-c { width: 34vw; height: 34vw; left: 30vw; bottom: -22vw; background: radial-gradient(circle, #0b5f8a, transparent 65%); animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(4vw, 3vw, 0) scale(1.12); } }

/* ------------------------------------------------------------ layout */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1.2rem, 5vw, 4rem);
  background: rgba(5, 8, 22, .72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; }
.brand-mark svg { width: 1.4rem; height: 1.4rem; }
.brand-name { font-size: 1.12rem; letter-spacing: .01em; }
.brand-name strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.topnav { display: flex; gap: .4rem; }
.topnav-link {
  appearance: none; border: 1px solid transparent; background: transparent; color: var(--ink-dim);
  font: inherit; font-weight: 600; padding: .55rem 1rem; border-radius: 999px; cursor: pointer;
  transition: color .18s, background .18s, border-color .18s;
}
.topnav-link:hover { color: var(--ink); }
.topnav-link.is-active { color: var(--ink); background: rgba(118, 135, 255, .12); border-color: rgba(118, 135, 255, .4); }
.badge-soon { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #ffd28a; background: rgba(255, 180, 60, .12); border: 1px solid rgba(255, 180, 60, .35); border-radius: 999px; padding: .1rem .45rem; margin-left: .35rem; vertical-align: 1px; }

main { max-width: 1180px; margin: 0 auto; padding: clamp(2rem, 5vw, 4.5rem) clamp(1.2rem, 5vw, 3rem) 5rem; }

.view { animation: rise .5s cubic-bezier(.2, .8, .25, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ------------------------------------------------------------- hero */
.hero { max-width: 46rem; margin-bottom: 3rem; }
.eyebrow { color: var(--cyan); font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; margin: 0 0 .8rem; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.12; margin: 0 0 1rem; letter-spacing: -.02em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--ink-dim); font-size: 1.06rem; margin: 0; }
.hero-sub strong { color: var(--ink); }

/* ------------------------------------------------------ glass cards */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.unlock-grid { display: grid; grid-template-columns: minmax(0, 26rem) 1fr; gap: 1.6rem; align-items: start; }
@media (max-width: 880px) { .unlock-grid { grid-template-columns: 1fr; } }

.unlock-card { padding: 1.8rem; }
.unlock-card::before {
  content: ""; display: block; height: 3px; border-radius: 999px; margin: -1.8rem -1.8rem 1.6rem;
  background: var(--grad);
}

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .45rem; }
.field .hint { color: var(--ink-mute); font-weight: 500; font-size: .8rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

input, select {
  width: 100%; padding: .8rem 1rem; font: inherit; color: var(--ink);
  background: rgba(6, 10, 30, .8); border: 1px solid var(--line); border-radius: 13px;
  outline: none; transition: border-color .16s, box-shadow .16s;
}
input::placeholder { color: #4d5588; }
input:focus, select:focus { border-color: rgba(67, 221, 255, .65); box-shadow: 0 0 0 4px rgba(67, 221, 255, .12); }
input:disabled { opacity: .45; cursor: not-allowed; }
.mono { font-family: "Cascadia Code", Consolas, monospace; letter-spacing: .06em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-weight: 700; padding: .8rem 1.35rem; border-radius: 13px; cursor: pointer;
  border: 1px solid transparent; transition: transform .14s, box-shadow .18s, opacity .18s;
}
.btn svg { width: 1.1rem; height: 1.1rem; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(70, 60, 255, .35); }
.btn-primary:hover:not([disabled]) { box-shadow: 0 14px 40px rgba(70, 60, 255, .5); }
.btn-ghost { background: rgba(118, 135, 255, .08); border-color: var(--line); color: var(--ink-dim); }
.btn-ghost:hover { color: var(--ink); border-color: rgba(118, 135, 255, .45); }
.btn-danger { background: linear-gradient(100deg, #ff3d7f, #ff5c91); color: #fff; box-shadow: 0 10px 30px rgba(255, 60, 120, .3); }
.btn-block { width: 100%; }

.form-error { color: var(--red); font-size: .9rem; font-weight: 600; margin: .2rem 0 .8rem; }
.micro-note { color: var(--ink-mute); font-size: .8rem; margin: .9rem 0 0; }

/* -------------------------------------------------------- side notes */
.side-notes { display: grid; gap: 1rem; align-content: start; }
.note-card {
  display: flex; gap: 1rem; padding: 1.15rem 1.25rem;
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px;
  backdrop-filter: blur(16px);
}
.note-card p { margin: .15rem 0 0; color: var(--ink-dim); font-size: .88rem; }
.note-card strong { font-size: .95rem; }
.note-icon { flex: 0 0 auto; width: 2.7rem; height: 2.7rem; display: grid; place-items: center; border-radius: 12px; }
.note-icon svg { width: 1.4rem; height: 1.4rem; }
.note-icon.shield { color: #6ee7ff; background: rgba(67, 221, 255, .1); border: 1px solid rgba(67, 221, 255, .3); }
.note-icon.play { color: #b49aff; background: rgba(168, 41, 255, .12); border: 1px solid rgba(168, 41, 255, .35); }
.note-icon.lock { color: #7ce7b0; background: rgba(36, 228, 143, .1); border: 1px solid rgba(36, 228, 143, .3); }
.note-icon code { background: rgba(118,135,255,.14); padding: .05rem .35rem; border-radius: 6px; font-size: .82em; }

/* ------------------------------------------------------------ panel */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.device-title { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.01em; }
.panel-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

.playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.2rem; }

.playlist-card { position: relative; overflow: hidden; padding: 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .9rem; animation: rise .4s cubic-bezier(.2,.8,.25,1) both; }
.playlist-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2.5px; background: var(--grad); opacity: .85; }
.playlist-type { display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .28rem .7rem; border-radius: 999px; }
.playlist-type.xtream { color: #b49aff; background: rgba(168, 41, 255, .13); border: 1px solid rgba(168, 41, 255, .4); }
.playlist-type.m3u { color: #6ee7ff; background: rgba(67, 221, 255, .1); border: 1px solid rgba(67, 221, 255, .35); }
.playlist-name { font-size: 1.18rem; font-weight: 700; margin: 0; word-break: break-word; }
.playlist-meta { display: flex; align-items: center; gap: .5rem; color: var(--ink-mute); font-size: .82rem; margin: 0; }
.playlist-actions { display: flex; gap: .6rem; margin-top: auto; padding-top: .4rem; }
.playlist-actions .btn { flex: 1; padding: .62rem .8rem; font-size: .9rem; }
.secure-note { display: flex; align-items: center; gap: .4rem; color: var(--ink-mute); font-size: .78rem; margin: 0; }
.secure-note svg { width: .95rem; height: .95rem; color: #7ce7b0; }

.empty-state { text-align: center; padding: 4.5rem 1rem; color: var(--ink-dim); }
.empty-state.is-hidden, .is-hidden { display: none !important; }
.empty-ring { width: 5.2rem; height: 5.2rem; margin: 0 auto 1.4rem; display: grid; place-items: center; border-radius: 50%; background: rgba(118, 135, 255, .07); border: 1px dashed rgba(118, 135, 255, .4); }
.empty-ring svg { width: 2.3rem; height: 2.3rem; color: var(--ink-mute); }
.empty-state h2 { color: var(--ink); margin: 0 0 .5rem; }
.empty-state p { max-width: 30rem; margin: 0 auto 1.6rem; }

/* -------------------------------------------------------- activation */
.activation-wrap { display: grid; grid-template-columns: minmax(0, 26rem) 1fr; gap: 1.6rem; align-items: start; }
@media (max-width: 880px) { .activation-wrap { grid-template-columns: 1fr; } }
.activation-card { padding: 1.8rem; position: relative; opacity: .88; }
.activation-card::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); background: repeating-linear-gradient(-45deg, rgba(120,135,255,.04) 0 12px, transparent 12px 24px); pointer-events: none; }
.activation-head h2 { margin: .4rem 0 .6rem; font-size: 1.6rem; }
.activation-head p { color: var(--ink-dim); font-size: .95rem; }
.badge-disabled { display: inline-flex; align-items: center; gap: .4rem; color: #ffd28a; background: rgba(255, 180, 60, .1); border: 1px solid rgba(255, 180, 60, .35); border-radius: 999px; padding: .3rem .8rem; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* ------------------------------------------------------------ modals */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 1.2rem;
  background: rgba(2, 4, 14, .72); backdrop-filter: blur(8px);
  animation: fade .22s ease both;
}
@keyframes fade { from { opacity: 0; } }
.modal { width: min(34rem, 100%); max-height: calc(100vh - 3rem); overflow: auto; padding: 1.8rem; animation: rise .3s cubic-bezier(.2,.8,.25,1) both; }
.modal-small { width: min(26rem, 100%); }
.modal h2 { margin: 0 0 1.2rem; font-size: 1.4rem; }
.modal-text { color: var(--ink-dim); margin: -0.4rem 0 1.1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.4rem; }

.type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.2rem; }
.type-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 700; padding: .75rem .6rem; color: var(--ink-dim);
  background: rgba(6, 10, 30, .8); border: 1px solid var(--line); border-radius: 13px; cursor: pointer;
  transition: border-color .16s, color .16s, background .16s;
}
.type-btn svg { width: 1.15rem; height: 1.15rem; }
.type-btn:hover { color: var(--ink); }
.type-btn.is-active { color: #fff; background: rgba(118, 135, 255, .14); border-color: rgba(67, 221, 255, .6); box-shadow: 0 0 0 4px rgba(67, 221, 255, .1); }

/* ------------------------------------------------------------ toast */
.toast-root { position: fixed; z-index: 60; right: 1.2rem; bottom: 1.2rem; display: grid; gap: .6rem; }
.toast {
  display: flex; align-items: center; gap: .6rem; min-width: 16rem; max-width: 22rem;
  padding: .85rem 1.1rem; border-radius: 14px; font-weight: 600; font-size: .92rem;
  background: var(--glass-strong); border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: rise .3s cubic-bezier(.2,.8,.25,1) both;
}
.toast.ok { border-color: rgba(36, 228, 143, .5); }
.toast.ok::before { content: "✓"; color: var(--green); font-weight: 800; }
.toast.err { border-color: rgba(255, 92, 145, .55); }
.toast.err::before { content: "!"; color: var(--red); font-weight: 800; }

/* ---------------------------------------------------------- footer */
.footer {
  display: flex; align-items: center; justify-content: center; gap: .9rem; flex-wrap: wrap;
  padding: 1.6rem 1rem 2rem; color: var(--ink-mute); font-size: .8rem;
  border-top: 1px solid var(--line);
}
.footer-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-mute); }

:focus-visible { outline: 2px solid rgba(67, 221, 255, .8); outline-offset: 2px; }
