/* ============================================================================
   STYLE.CSS
   Wygląd strony. Kolory motywu (accent) są nadpisywane w locie przez
   script.js na podstawie config.js -> theme.accent / theme.accentSecondary.
   Zwykle NIE musisz edytować tego pliku, żeby dostosować stronę do siebie -
   wystarczy config.js. Ale jeśli chcesz zmienić np. zaokrąglenia rogów,
   rozmiary czy odstępy, wszystko jest tutaj poukładane i podpisane.
   ============================================================================ */

:root{
  --accent: #7c5cff;
  --accent-2: #22d3ee;

  --bg-void: #07070b;
  --card-bg: rgba(18, 18, 24, 0.55);
  --card-bg-solid: #131318;
  --card-border: rgba(255,255,255,0.09);
  --text-primary: #f4f4f7;
  --text-muted: #9d9da8;
  --text-dim: #6f6f7a;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-card: 0 20px 60px -20px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.04) inset;
}

*{ box-sizing: border-box; }

html,body{
  margin:0;
  padding:0;
  min-height:100%;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x:hidden;
}

::selection{ background: var(--accent); color:#fff; }

a{ color:inherit; text-decoration:none; }

button{
  font-family:inherit;
  border:none;
  background:none;
  color:inherit;
  cursor:pointer;
}

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============================== TŁO ============================== */

#bg-layer{
  position:fixed;
  inset:0;
  z-index:0;
  overflow:hidden;
  background: var(--bg-void);
}

#bg-media{
  position:absolute;
  inset: -20px; /* margines żeby blur nie odsłaniał krawędzi */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(var(--bg-blur, 4px));
  transform: scale(1.03);
}

#bg-media video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
}

#bg-overlay{
  position:absolute;
  inset:0;
  background: rgba(4,4,7, var(--bg-darken, 0.45));
  background-image:
    radial-gradient(circle at 50% -10%, rgba(0,0,0,0) 0%, rgba(4,4,7,0.35) 70%),
    linear-gradient(180deg, rgba(4,4,7,0.15) 0%, rgba(4,4,7,0.55) 100%);
}

#bg-noise{
  position:absolute;
  inset:0;
  opacity:0.035;
  pointer-events:none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ============================== CZĄSTECZKI ============================== */

#particles{
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  overflow:hidden;
}

.particle{
  position:absolute;
  bottom:-10px;
  border-radius:50%;
  background: var(--particle-color, #fff);
  opacity:0;
  filter: blur(0.5px);
  animation-name: particle-float;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes particle-float{
  0%{ transform: translate(0,0); opacity:0; }
  8%{ opacity: var(--particle-opacity, 0.5); }
  90%{ opacity: var(--particle-opacity, 0.5); }
  100%{ transform: translate(var(--drift,20px), -110vh); opacity:0; }
}

/* ============================== POŚWIATA KURSORA ============================== */

#cursor-aura{
  position:fixed;
  top:0; left:0;
  width:640px;
  height:640px;
  margin-left:-320px;
  margin-top:-320px;
  border-radius:50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent) 0%, transparent 70%);
  pointer-events:none;
  z-index:2;
  opacity:0;
  transition: opacity .4s ease;
  will-change: transform;
  mix-blend-mode: screen;
}
#cursor-aura.active{ opacity:1; }

/* ============================== LAYOUT GŁÓWNY ============================== */

#page{
  position:relative;
  z-index:3;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
  padding: 48px 16px 60px;
}

.glass{
  width:100%;
  max-width:420px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow-card);
}

/* ============================== KARTA PROFILU ============================== */

#card{
  padding: 16px 26px 26px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  animation: card-in .6s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes card-in{
  from{ opacity:0; transform: translateY(14px); }
  to{ opacity:1; transform: translateY(0); }
}

.card-topbar{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 4px 2px 0;
}

.stat-views{
  display:flex;
  align-items:center;
  gap:6px;
  font-family: var(--font-mono);
  font-size:12.5px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border:1px solid var(--card-border);
  padding:5px 10px;
  border-radius: 999px;
}
.stat-views .icon-eye{ width:14px; height:14px; color: var(--text-muted); }

.badge-icon{
  width:30px;
  height:30px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--bg-void);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px var(--card-border), 0 4px 14px -4px color-mix(in srgb, var(--accent) 70%, transparent);
}
.badge-icon svg{ width:16px; height:16px; }
.badge-icon:empty{ display:none; }

.avatar-wrap{ margin-top:6px; }

.avatar-ring{
  position:relative;
  width:118px;
  height:118px;
  border-radius:50%;
}

.avatar-ring-spin{
  position:absolute;
  inset:0;
  border-radius:50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  animation: ring-spin 5s linear infinite;
}

@keyframes ring-spin{
  to{ transform: rotate(360deg); }
}

.avatar-img{
  position:absolute;
  inset:4px;
  border-radius:50%;
  background-color: var(--card-bg-solid);
  background-size:cover;
  background-position:center;
  border: 3px solid var(--card-bg-solid);
}

.status-dot{
  position:absolute;
  right:4px;
  bottom:4px;
  width:22px;
  height:22px;
  border-radius:50%;
  border:3px solid var(--card-bg-solid);
  background: var(--status-color, transparent);
}
.status-dot:empty, .status-dot[data-empty="true"]{ display:none; }

#username{
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:7px;
  letter-spacing: -0.01em;
}

.verified-badge{
  width:18px;
  height:18px;
  color: var(--accent);
  display:inline-flex;
}
.verified-badge:empty{ display:none; }

#tagline{
  margin:8px 0 0;
  font-family: var(--font-mono);
  font-size:13.5px;
  color: var(--accent-2);
  min-height:18px;
}
#tagline-cursor{
  animation: blink 1s step-end infinite;
}
@keyframes blink{ 50%{ opacity:0; } }

#bio{
  margin: 12px 0 0;
  font-size: 14px;
  line-height:1.55;
  color: var(--text-muted);
  max-width: 320px;
}
#bio:empty{ display:none; margin:0; }

.socials{
  margin-top:18px;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
}

.social-btn{
  width:40px;
  height:40px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.06);
  border:1px solid var(--card-border);
  color: var(--text-primary);
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.social-btn svg{ width:18px; height:18px; }
.social-btn:hover, .social-btn:focus-visible{
  transform: translateY(-3px);
  background: var(--accent);
  border-color: var(--accent);
  color:#fff;
}

/* ============================== KARTY WYRÓŻNIONE ============================== */

#featured-list{
  width:100%;
  max-width:420px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.featured-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  background: var(--card-bg);
  border:1px solid var(--card-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow-card);
}

.featured-thumb{
  position:relative;
  width:42px;
  height:42px;
  border-radius:50%;
  background-size:cover;
  background-position:center;
  background-color: rgba(255,255,255,0.08);
  flex-shrink:0;
}
.featured-thumb .fdot{
  position:absolute;
  right:-2px;
  bottom:-2px;
  width:13px;
  height:13px;
  border-radius:50%;
  border:2.5px solid var(--card-bg-solid);
}

.featured-text{
  flex:1;
  min-width:0;
}
.featured-title{
  font-family: var(--font-display);
  font-weight:600;
  font-size:14.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  display:flex;
  align-items:center;
  gap:5px;
}
.featured-subtitle{
  font-size:12.5px;
  color: var(--text-muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.featured-btn{
  flex-shrink:0;
  font-size:12.5px;
  font-weight:600;
  padding:9px 14px;
  border-radius:999px;
  background: rgba(255,255,255,0.08);
  border:1px solid var(--card-border);
  display:flex;
  align-items:center;
  gap:5px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
  white-space:nowrap;
}
.featured-btn:hover, .featured-btn:focus-visible{
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.featured-btn svg{ width:12px; height:12px; }

/* ============================== ODTWARZACZ MUZYKI ============================== */

#player{
  padding:16px 18px 18px;
}

.player-top{
  display:flex;
  align-items:center;
  gap:12px;
}

.player-cover{
  width:44px;
  height:44px;
  border-radius: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, black), color-mix(in srgb, var(--accent-2) 45%, black));
  background-size:cover;
  background-position:center;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(255,255,255,0.85);
}
.player-cover svg{ width:18px; height:18px; }

.player-meta{ flex:1; min-width:0; }
.player-track-title{
  font-family: var(--font-display);
  font-weight:600;
  font-size:14.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.player-track-artist{
  font-size:12px;
  color: var(--text-muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.player-icon-btn{
  width:34px;
  height:34px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--text-primary);
  flex-shrink:0;
  transition: background .18s ease, color .18s ease;
}
.player-icon-btn:hover, .player-icon-btn:focus-visible{ background: rgba(255,255,255,0.08); }
.player-icon-btn svg{ width:17px; height:17px; fill:currentColor; }
.player-icon-btn.small{ width:28px; height:28px; }
.player-icon-btn.small svg{ width:15px; height:15px; }

.player-icon-btn.play{
  width:42px;
  height:42px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#fff;
}
.player-icon-btn.play:hover{ filter: brightness(1.08); }

#visualizer{
  width:100%;
  height:34px;
  display:block;
  margin-top:12px;
  opacity:0.85;
}

.player-progress-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
}

.time{
  font-family: var(--font-mono);
  font-size:11px;
  color: var(--text-dim);
  width:36px;
  flex-shrink:0;
  text-align:center;
}

.progress-bar{
  position:relative;
  flex:1;
  height:14px;
  display:flex;
  align-items:center;
  cursor:pointer;
}
.progress-bar::before{
  content:"";
  position:absolute;
  left:0; right:0;
  height:4px;
  border-radius:999px;
  background: rgba(255,255,255,0.1);
}
.progress-fill{
  position:absolute;
  left:0;
  height:4px;
  width:0%;
  border-radius:999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  pointer-events:none;
}
.progress-handle{
  position:absolute;
  left:0%;
  width:12px;
  height:12px;
  border-radius:50%;
  background:#fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 50%, transparent);
  transform: translateX(-50%);
  pointer-events:none;
}

.player-controls{
  display:flex;
  align-items:center;
  margin-top:6px;
  gap:10px;
}

.volume-wrap{
  display:flex;
  align-items:center;
  gap:6px;
  width:110px;
}
#volume-slider{
  -webkit-appearance:none;
  appearance:none;
  width:100%;
  height:4px;
  border-radius:999px;
  background: rgba(255,255,255,0.12);
  outline:none;
}
#volume-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:12px; height:12px;
  border-radius:50%;
  background:#fff;
  cursor:pointer;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 50%, transparent);
}
#volume-slider::-moz-range-thumb{
  width:12px; height:12px;
  border:none;
  border-radius:50%;
  background:#fff;
  cursor:pointer;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 50%, transparent);
}

.transport{
  display:flex;
  align-items:center;
  gap:4px;
  margin:0 auto;
}

.spacer{ width:110px; }

.queue-panel{
  max-height:0;
  overflow:hidden;
  transition: max-height .3s ease;
}
.queue-panel.open{
  max-height:280px;
  overflow-y:auto;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--card-border);
}

.queue-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 6px;
  border-radius:10px;
  cursor:pointer;
  transition: background .15s ease;
}
.queue-item:hover{ background: rgba(255,255,255,0.05); }
.queue-item.active{ color: var(--accent-2); }
.queue-index{
  width:20px;
  font-family: var(--font-mono);
  font-size:11px;
  color: var(--text-dim);
  text-align:center;
  flex-shrink:0;
}
.queue-item.active .queue-index{ color: var(--accent-2); }
.queue-info{ flex:1; min-width:0; }
.queue-title{
  font-size:13px;
  font-weight:500;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.queue-artist{
  font-size:11.5px;
  color: var(--text-dim);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ============================== STOPKA ============================== */

#site-footer{
  margin-top:6px;
  font-size:11.5px;
  color: var(--text-dim);
  text-align:center;
}
#site-footer:empty{ display:none; }

/* ============================== EKRAN POWITALNY ============================== */

#enter-screen{
  position:fixed;
  inset:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--bg-void);
  transition: opacity .5s ease, visibility .5s ease;
}
#enter-screen.hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

#enter-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  padding:20px;
  text-align:center;
}

#enter-avatar-ring{
  width:84px;
  height:84px;
  border-radius:50%;
  padding:3px;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  animation: ring-spin 5s linear infinite;
}
#enter-avatar{
  width:100%;
  height:100%;
  border-radius:50%;
  background-color: var(--card-bg-solid);
  background-size:cover;
  background-position:center;
  border:3px solid var(--bg-void);
}

#enter-name{
  font-family: var(--font-display);
  font-size:16px;
  color: var(--text-muted);
  margin:0;
}

#enter-btn{
  margin-top:6px;
  padding:14px 28px;
  border-radius:999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#fff;
  font-family: var(--font-display);
  font-weight:600;
  font-size:14px;
  letter-spacing:0.02em;
  text-transform:uppercase;
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent);
  animation: pulse-btn 2.4s ease-in-out infinite;
  transition: transform .15s ease;
}
#enter-btn:hover{ transform: scale(1.04); }
#enter-btn:active{ transform: scale(0.98); }

@keyframes pulse-btn{
  0%, 100%{ box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent); }
  50%{ box-shadow: 0 10px 40px -4px color-mix(in srgb, var(--accent) 85%, transparent); }
}

#enter-hint{
  margin:0;
  font-size:12px;
  color: var(--text-dim);
}

/* ============================== RESPONSYWNOŚĆ ============================== */

@media (max-width: 480px){
  #page{ padding: 32px 12px 44px; gap:12px; }
  #card{ padding:14px 18px 22px; }
  #username{ font-size:21px; }
  .glass{ border-radius: 20px; }
  .spacer{ display:none; }
  .volume-wrap{ width:80px; }
}

/* ============================== RUCH OGRANICZONY (dostępność) ============================== */

@media (prefers-reduced-motion: reduce){
  .avatar-ring-spin, #enter-avatar-ring, #enter-btn, .particle, #tagline-cursor{
    animation: none !important;
  }
  #cursor-aura{ display:none !important; }
  #card{ animation:none !important; }
}
