:root {
    --bg-main: #0a0b0e;
    --bg-card: rgba(22, 25, 32, 0.7);
    --bg-card-hover: rgba(31, 36, 45, 0.8);
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --accent-hover: #7c3aed;
    --discord-color: #5865F2;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.08);
    --radius-lg: 20px;
    --radius-md: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Animated Background Blobs */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.35;
    animation: pulseGlow 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 450px;
    height: 450px;
    background: #7c3aed;
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: #ec4899;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.25; }
    50% { transform: scale(1.2) translate(40px, -30px); opacity: 0.45; }
    100% { transform: scale(0.9) translate(-30px, 40px); opacity: 0.25; }
}

.app-container {
    width: 100%;
    max-width: 1280px;
    height: 90vh;
    max-height: 900px;
    position: relative;
}

/* Szekciók közti váltás */
.view-section {
    display: none;
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.4s ease, transform 0.4s ease;
    width: 100%;
    height: 100%;
}

.view-section.active {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

/* --- FŐOLDAL DESIGN --- */
#homePage {
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.main-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 15px var(--accent-glow);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-title span {
    background: linear-gradient(135deg, #a78bfa, #ec4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-discord {
    background: var(--discord-color);
    color: #fff;
}

.btn-discord:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

.btn-donate {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #fff;
}

.btn-donate:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(225, 29, 72, 0.4);
}

.discord-card {
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: var(--radius-md);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.discord-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.discord-icon {
    font-size: 2rem;
    color: var(--discord-color);
}

.discord-info h3 { font-size: 1.1rem; }
.discord-info p { font-size: 0.85rem; color: var(--text-secondary); }

.btn-discord-join {
    background: var(--discord-color);
    color: #fff;
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* --- LEJÁTSZÓ DESIGN --- */
#playerPage {
    display: none;
    grid-template-columns: 460px 1fr;
    gap: 24px;
}

#playerPage.active {
    display: grid;
}

.player-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-clickable {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo-text {
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-back-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.nav-back-btn:hover { color: #fff; border-color: #fff; }

.now-playing-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.cover-wrapper {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-details h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.track-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Vezérlők */
.player-controls { display: flex; flex-direction: column; gap: 16px; }

.progress-container { display: flex; align-items: center; gap: 12px; }

.time-stamp { font-size: 0.75rem; color: var(--text-secondary); min-width: 35px; }

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: var(--border-color);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.4);
    box-shadow: 0 0 10px var(--accent-glow);
}

.buttons-container { display: flex; justify-content: center; align-items: center; gap: 16px; }

.ctrl-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ctrl-btn:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }

.ctrl-btn.active { color: var(--accent); }

.ctrl-btn.main-btn {
    background: var(--accent);
    color: #fff;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.ctrl-btn.main-btn:hover { background: var(--accent-hover); transform: scale(1.08); }

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 60%;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Dalszöveg kártya & Nagyítás */
.lyrics-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: auto;
    transition: var(--transition);
}

.lyrics-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expand-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.expand-btn:hover { color: #fff; }

.lyrics-content {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-primary);
    max-height: 140px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Nagyított Dalszöveg Modal NÉZET */
.lyrics-card.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    z-index: 1000;
    background: rgba(15, 17, 21, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid var(--accent);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

.lyrics-card.expanded .lyrics-content {
    max-height: 60vh;
    font-size: 1.05rem;
}

/* Jobb oldal - Sidebar */
.sidebar-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.sidebar-header { display: flex; flex-direction: column; gap: 12px; }

.sidebar-header h2 { font-size: 1.2rem; font-weight: 700; }

.category-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.filter-btn:hover { color: var(--text-primary); border-color: var(--text-secondary); }

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.playlist-container { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-right: 4px; }

.track-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.track-card:hover { background: var(--bg-card-hover); }

.track-card.active {
    background: var(--bg-card-hover);
    border-color: rgba(139, 92, 246, 0.4);
}

.track-card .track-img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }

.track-card .track-info { flex: 1; overflow: hidden; }

.track-card .track-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-card .track-author { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }

.track-card .play-icon { font-size: 0.85rem; color: var(--text-secondary); opacity: 0; transition: var(--transition); }

.track-card:hover .play-icon, .track-card.active .play-icon { opacity: 1; color: var(--accent); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

@media (max-width: 900px) {
    body { padding: 0; }
    .app-container { height: auto; max-height: none; }
    #playerPage { grid-template-columns: 1fr; }
}

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #121212; /* Sötét zenei téma háttér */
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  font-family: sans-serif;
}

.loader-content {
  text-align: center;
  width: 300px;
}

.loader-logo {
  max-width: 120px;
  height: auto;
  margin-bottom: 20px;
  /* Opcionális finom lüktetés a logónak */
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

#loader-text {
  font-size: 14px;
  color: #b3b3b3;
  margin-bottom: 12px;
  min-height: 20px;
}

/* Sáv háttér */
/* Folyamatsáv keret */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #282828;
  border-radius: 4px;
  overflow: hidden;
}

/* Töltődő sáv - átmenet (transition) nélkül a folyamatos haladásért */
#progress-bar {
  width: 0%;
  height: 100%;
  background-color: #1db954;
  transition: none; /* Kikapcsoljuk az akadozás elkerülése érdekében */
}

/* Rejtő osztály */
#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* ==========================================
   FRISSÍTÉSEK BOX STÍLUS
   ========================================== */
.updates-box {
  background: #181818;
  border: 1px solid #282828;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  color: #fff;
}

.updates-box h2 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #1db954; /* Zöld kiemelő szín */
  display: flex;
  align-items: center;
  gap: 10px;
}

.updates-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.updates-list li {
  padding: 8px 0;
  border-bottom: 1px solid #282828;
  font-size: 0.95rem;
  color: #b3b3b3;
}

.updates-list li:last-child {
  border-bottom: none;
}

.updates-list strong {
  color: #fff;
}

/* ==========================================
   TOAST ÉRTESÍTÉS (3 MP ELTŰNŐ BOX)
   ========================================== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #1db954;
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.toast.hidden {
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
}