/* ============================================================
   Tema "Liquid Glass": suprafete de sticla translucida peste un
   fundal colorat in miscare (pe pagina serverului: coperta melodiei)
   ============================================================ */
:root {
  --bg: #07060d;
  --text: #f5f3ff;
  --muted: rgba(235, 230, 255, 0.68);
  --accent: #b26bff;
  --accent-2: #ff5fa8;
  --green: #34d399;
  --red: #fb7185;
  --radius: 26px;
  --gradient: linear-gradient(135deg, #b26bff, #ff5fa8);

  /* Sticla */
  --glass: rgba(255, 255, 255, 0.075);
  --glass-strong: rgba(255, 255, 255, 0.13);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-blur: blur(28px) saturate(185%);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 22px rgba(255, 255, 255, 0.04),
    0 18px 50px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button, input, select { font: inherit; color: inherit; }

/* ---------- Fundalul viu din spatele sticlei ---------- */
.backdrop { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.backdrop .blob {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  filter: blur(70px); opacity: .55; mix-blend-mode: screen;
  animation: drift 26s ease-in-out infinite alternate;
}
.blob.b1 { background: #7c3aed; top: -14vmax; left: -10vmax; }
.blob.b2 { background: #ec4899; bottom: -18vmax; right: -12vmax; animation-delay: -8s; }
.blob.b3 { background: #2563eb; top: 30%; left: 45%; width: 32vmax; height: 32vmax; opacity: .35; animation-delay: -16s; }
.blob.b4 { background: #06b6d4; bottom: 5%; left: -8vmax; width: 26vmax; height: 26vmax; opacity: .25; animation-delay: -4s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.12); }
  100% { transform: translate(-4vmax, 7vmax) scale(.95); }
}
/* Coperta melodiei curente ca lumina ambientala (pagina serverului) */
.backdrop .ambient {
  position: absolute; inset: -10%; background: var(--ambient, none) center / cover no-repeat;
  filter: blur(90px) saturate(170%); opacity: 0; transition: opacity 1.2s ease, background-image 1.2s ease;
}
body.has-ambient .backdrop .ambient { opacity: .55; }
body.has-ambient .backdrop .blob { opacity: .25; }
/* Un pic de "zgomot" ca sticla sa para reala */
.backdrop::after {
  content: ''; position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) {
  .backdrop .blob { animation: none; }
}

/* ---------- Suprafata de sticla (folosita peste tot) ---------- */
.glass, .card, .nav-inner, .btn, .input, .status-pill, .banner, .toast, .server-icon, .feature .icon {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
/* Reflexia de pe marginea de sus a sticlei */
.card, .nav-inner { position: relative; isolation: isolate; }
.card::before, .nav-inner::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 38%),
    radial-gradient(120% 60% at 15% 0%, rgba(255, 255, 255, 0.10), transparent 60%);
}

.container { width: min(1120px, 100% - 32px); margin: 0 auto; }

/* ---------- Navbar plutitor ---------- */
.nav { position: sticky; top: 12px; z-index: 10; padding: 0 16px; }
.nav-inner {
  width: min(1120px, 100%); margin: 12px auto 0; border-radius: 999px;
  display: flex; align-items: center; gap: 16px; height: 62px; padding: 0 12px 0 16px;
  background: rgba(20, 16, 36, 0.35);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.nav-links { display: flex; gap: 6px; margin-left: 18px; color: var(--muted); font-weight: 500; }
.nav-links a { padding: 7px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.user-chip img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.3); }

/* ---------- Butoane de sticla ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--glass-strong);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1.4), background .2s, box-shadow .2s;
}
.btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-1px); }
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, rgba(178, 107, 255, 0.85), rgba(255, 95, 168, 0.85));
  border-color: rgba(255, 255, 255, 0.35); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 30px rgba(178, 107, 255, 0.45);
}
.btn-primary:hover { background: linear-gradient(135deg, rgba(190, 125, 255, 0.95), rgba(255, 115, 180, 0.95)); }
.btn-discord {
  background: rgba(88, 101, 242, 0.75); border-color: rgba(255,255,255,.3); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 24px rgba(88, 101, 242, 0.45);
}
.btn-discord:hover { background: rgba(105, 117, 250, 0.9); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-sm { padding: 7px 15px; font-size: 14px; }
.btn-icon { width: 48px; height: 48px; padding: 0; font-size: 18px; }
.btn-icon.big { width: 64px; height: 64px; font-size: 24px; }
.btn.active { background: rgba(178, 107, 255, 0.35); border-color: rgba(214, 170, 255, 0.6); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 90px 0 64px; text-align: center; }
.hero-avatar {
  width: 136px; height: 136px; border-radius: 50%; margin: 0 auto 24px;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 0 0 8px rgba(255,255,255,.06), 0 0 0 9px rgba(255,255,255,.14), 0 24px 70px rgba(178, 107, 255, 0.55);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.hero h1 { font-size: clamp(38px, 6.5vw, 72px); line-height: 1.02; margin: 0 0 18px; letter-spacing: -0.035em; font-weight: 800; }
.gradient-text { background: linear-gradient(135deg, #d8b4fe, #ff8cc6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 19px; max-width: 620px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  padding: 7px 16px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--green); box-shadow: 0 0 12px var(--green); }
.dot.off { background: var(--red); box-shadow: 0 0 12px var(--red); }

/* ---------- Sectiuni ---------- */
section { padding: 56px 0; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 8px; letter-spacing: -0.02em; }
.section-title p { color: var(--muted); margin: 0; }
code {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace; font-size: .9em;
  background: rgba(255, 255, 255, 0.1); padding: 2px 7px; border-radius: 8px;
}

.grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { border-radius: var(--radius); padding: 24px; }
.feature { transition: translate .3s cubic-bezier(.2, .8, .2, 1.2), background .3s; }
.feature:hover { translate: 0 -4px; background: rgba(255, 255, 255, 0.11); }
.feature .icon {
  width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center;
  font-size: 22px; margin-bottom: 14px; background: var(--glass-strong);
}
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); }

.commands { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.command { display: flex; gap: 12px; align-items: baseline; padding: 14px 18px; border-radius: 20px; }
.command code { font-weight: 700; color: #e9d5ff; background: rgba(178, 107, 255, 0.2); white-space: nowrap; }
.command span { color: var(--muted); }

.cta { text-align: center; padding: 52px 24px; background: linear-gradient(135deg, rgba(178,107,255,.22), rgba(255,95,168,.16)); }
.cta h2 { margin: 0 0 10px; font-size: 32px; justify-content: center; letter-spacing: -0.02em; }
.cta p { color: var(--muted); margin: 0 0 24px; }

footer { padding: 32px 0 40px; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- Dashboard ---------- */
.page { padding: 36px 0 80px; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 32px; letter-spacing: -0.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.banner {
  display: flex; gap: 10px; align-items: center; padding: 14px 20px; border-radius: 20px; margin-bottom: 24px;
  background: rgba(251, 113, 133, 0.14); border-color: rgba(251, 113, 133, 0.4); color: #ffe4e6;
  text-align: left;
}
.servers { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.server-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 28px 18px; }
.server-card:hover { background: rgba(255, 255, 255, 0.11); }
.server-icon {
  width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center;
  font-weight: 800; font-size: 24px; color: var(--muted); overflow: hidden; flex-shrink: 0;
}
.server-icon img { width: 100%; height: 100%; object-fit: cover; }
.server-card h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.card h2 { margin: 0 0 16px; font-size: 18px; display: flex; align-items: center; gap: 8px; }

.now { display: flex; gap: 22px; align-items: center; }
.now img, .now .thumb-empty {
  width: 156px; height: 156px; border-radius: 22px; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.thumb-empty { display: grid; place-items: center; font-size: 46px; background: var(--glass-strong); }
.now-info { min-width: 0; flex: 1; }
.now-title { display: block; font-size: 21px; font-weight: 700; margin: 0 0 4px; overflow-wrap: anywhere; letter-spacing: -0.01em; }
.now-sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.progress {
  height: 7px; border-radius: 99px; overflow: hidden;
  background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 1px 2px rgba(0,0,0,.35);
}
.progress > div {
  height: 100%; width: 0; border-radius: inherit; transition: width .9s linear;
  background: linear-gradient(90deg, #d8b4fe, #ff8cc6); box-shadow: 0 0 12px rgba(255, 140, 198, 0.8);
}
.times { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 6px; }
.controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.volume { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--muted); }

input[type=range] { flex: 1; appearance: none; -webkit-appearance: none; height: 7px; border-radius: 99px; background: rgba(255,255,255,.15); outline: none; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 2px 10px rgba(0,0,0,.4), inset 0 -2px 4px rgba(0,0,0,.12);
}
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.6); box-shadow: 0 2px 10px rgba(0,0,0,.4);
}

.add-form { display: flex; gap: 10px; margin-top: 22px; }
.input {
  flex: 1; min-width: 0; padding: 12px 18px; border-radius: 999px; outline: none;
  background: rgba(0, 0, 0, 0.22); box-shadow: inset 0 1px 3px rgba(0,0,0,.35), inset 0 -1px 0 rgba(255,255,255,.08);
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: rgba(235, 230, 255, 0.45); }
.input:focus { border-color: rgba(214, 170, 255, 0.7); box-shadow: inset 0 1px 3px rgba(0,0,0,.35), 0 0 0 4px rgba(178, 107, 255, 0.25); }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 16px; transition: background .2s; }
.queue li:hover { background: rgba(255, 255, 255, 0.07); }
.queue .pos { width: 26px; color: var(--muted); font-size: 14px; text-align: right; flex-shrink: 0; }
.queue img, .queue .qthumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--glass-strong); flex-shrink: 0; }
.queue .qtitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue .qdur { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; }
.field .input { width: 100%; }
.field small { display: block; color: var(--muted); margin-top: 5px; padding-left: 6px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Comutator in stil iOS */
.switch input {
  appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 999px; flex-shrink: 0;
  background: rgba(255,255,255,.16); border: 1px solid var(--glass-border); position: relative; cursor: pointer;
  transition: background .25s;
}
.switch input::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: transform .3s cubic-bezier(.2, .8, .2, 1.3);
}
.switch input:checked { background: linear-gradient(135deg, #b26bff, #ff5fa8); }
.switch input:checked::after { transform: translateX(20px); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 13px 22px; border-radius: 999px; background: rgba(30, 24, 50, 0.55);
  opacity: 0; transition: .3s cubic-bezier(.2, .8, .2, 1.2); z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.error { border-color: rgba(251, 113, 133, 0.6); color: #ffe4e6; }

.center { text-align: center; padding: 80px 0; }
.spinner {
  width: 38px; height: 38px; border-radius: 50%; margin: 0 auto;
  border: 3px solid rgba(255,255,255,.15); border-top-color: #e9d5ff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Browsere fara backdrop-filter: sticla devine mai opaca, ca textul sa ramana lizibil */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .nav-inner, .btn, .input, .status-pill, .banner, .toast { background: rgba(28, 22, 46, 0.92); }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .now { flex-direction: column; text-align: center; }
  .now img, .now .thumb-empty { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .user-chip span, .nav-right .btn-ghost { display: none; }
  .brand span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { padding-top: 56px; }
  .nav { padding: 0 10px; }
  .nav-inner { height: 56px; }
}

/* ---------- Animatii la scroll ---------- */
/* Elementele sunt ascunse doar cand ruleaza JavaScript-ul (clasa pusa de initScrollEffects) */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(34px) scale(.97);
  filter: blur(10px);
  /* Intarzierea se aplica doar aparitiei, nu si efectelor de hover */
  transition:
    opacity .8s cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0s),
    transform .9s cubic-bezier(.2, .8, .2, 1.1) var(--reveal-delay, 0s),
    filter .8s ease var(--reveal-delay, 0s),
    translate .3s cubic-bezier(.2, .8, .2, 1.2),
    background .3s ease;
}
.reveal-ready .reveal.in-view { opacity: 1; transform: none; filter: none; }

.hero-content { will-change: transform, opacity, filter; }
section { position: relative; z-index: 1; }
.nav-inner { transition: background .35s ease, box-shadow .35s ease, transform .35s ease; }
.nav.scrolled .nav-inner {
  background: rgba(20, 16, 36, 0.62);
  box-shadow: var(--glass-shadow), 0 10px 40px rgba(0, 0, 0, 0.45);
}

/* Prima aparitie a dashboard-ului unui server */
.appear > * { animation: appear .7s cubic-bezier(.2, .8, .2, 1.1) both; }
.appear > *:nth-child(2) { animation-delay: .08s; }
.appear > *:nth-child(3) { animation-delay: .16s; }
@keyframes appear { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } }

@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .appear > * { animation: none; }
  .hero-avatar { animation: none; }
}
