
:root {
    color-scheme: dark;

    /* ── Brand / accent skála ──────────────────────────────── */
    --accent-100: #dbeafe;
    --accent-200: #bfdbfe;
    --accent-300: #93c5fd;
    --accent-400: #60a5fa;
    --accent-500: #3b82f6;
    --accent-600: #2563eb;
    --accent-700: #1d4ed8;
    --accent-800: #1e40af;
    --accent-900: #172554;

    /* ── Surface skála ─────────────────────────────────────── */
    --bg: rgb(8, 18, 29);
    --surface-1: #1b2838;
    --surface-2: #162233;
    --surface-3: #1f2d3d;
    --surface-4: #0b1a2e;
    --surface-glass: rgba(22, 34, 51, 0.84);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.16);

    /* ── Szöveg ────────────────────────────────────────────── */
    --text-bright: #f8fafc;
    --text: #e2e8f0;
    --text-muted: rgba(226, 232, 240, 0.68);
    --text-faint: rgba(226, 232, 240, 0.45);
    --white: #ffffff;

    /* ── Státusz színek ────────────────────────────────────── */
    --success: #22c55e;
    --success-strong: #16a34a;
    --warning: #f59e0b;
    --warning-strong: #d97706;
    --danger: #ef4444;
    --danger-strong: #dc2626;
    --info: #38bdf8;

    /* ── Kiegészítő paletta ────────────────────────────────── */
    --purple: #8b5cf6;
    --purple-strong: #7c3aed;
    --indigo: #6366f1;
    --indigo-light: #818cf8;

    /* ── Tipográfia ────────────────────────────────────────── */
    --font-sans: "Roboto", system-ui, sans-serif;
    --font-mono: "Roboto Mono", ui-monospace, monospace;

    /* ── Spacing ───────────────────────────────────────────── */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* ── Radius ────────────────────────────────────────────── */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 14px;
    --radius-pill: 999px;

    /* ── Árnyékok ──────────────────────────────────────────── */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.24);

    /* ── Mozgás ────────────────────────────────────────────── */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;

    /* ── Komponens tokenek ─────────────────────────────────── */
    --search-border: rgba(248, 250, 252, 0.72);
    --search-border-focus: rgba(248, 250, 252, 0.96);
    --search-placeholder: rgba(248, 250, 252, 0.78);

    /* ── Visszafelé kompatibilis álnevek ───────────────────── */
    --accent: var(--accent-500);
    --accent-2: var(--accent-400);
    --accent-3: var(--accent-800);
    --background: var(--bg);
}

body {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 35%),
        linear-gradient(180deg, #0a1522 0%, var(--background) 100%);
    color: var(--text);
    overflow-x: hidden;
    font-family: var(--font-sans);
}

.line-background {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.mobile-navbar,
.main {
    position: relative;
}

.mobile-navbar {
    background-color: rgba(22, 34, 51, 0.88);
    backdrop-filter: blur(12px);
}

/* ── Oldalsáv: dalszekciók + görgetés ───────────────────── */

.sidebar .song-sections,
.offcanvas-body .song-sections {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-bottom: 10px;
}

.song-section-title {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin: 1.1rem 2px 0.35rem;
}

.song-sections > section:first-of-type .song-section-title {
    margin-top: 0.25rem;
}

/* ── Dalhivatkozás (oldalsáv / drawer / keresőpanel közös) ── */

.song-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.35;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.song-link:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.song-link.active-song,
.song-link.active {
    background-color: rgba(59, 130, 246, 0.18);
    color: var(--accent-200);
    font-weight: 600;
}

.song-link.kb-active {
    background-color: rgba(255, 255, 255, 0.08);
}

.song-item-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.search-state {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Lebegő keresőeredmény panel ────────────────────────── */

.search-wrap {
    position: relative;
}

.mobile-search-wrap {
    min-width: 0;
    position: relative;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1400;
    max-height: min(60vh, 430px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.45rem;
    background-color: rgba(16, 27, 41, 0.97);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.search-results[hidden] {
    display: none;
}

.offcanvas {
    background-color: rgba(11, 26, 46, 1);
}

.offcanvas-header {
    border-bottom: 1px solid var(--surface-3);
    color: var(--text);
}

.offcanvas .btn-close {
    opacity: 1;
    box-shadow: none;
}

.nav-link {
    color: var(--text);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: var(--surface-2);
    color: var(--accent);
}

.nav-link.active {
    background-color: var(--accent);
    color: var(--white);
}

.search-field {
    background-color: var(--surface-2);
    border: 1px solid var(--search-border);
    color: var(--text);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-field::placeholder {
    color: var(--search-placeholder);
    opacity: 1;
}

.search-field:focus {
    background-color: var(--surface-2);
    color: var(--text);
    border-color: var(--search-border-focus);
    box-shadow: 0 0 0 1px var(--search-border-focus);
}

.main {
    background-color: rgba(27, 40, 56, 0.84);
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

.sidebar {
    background-color: rgba(22, 34, 51, 0.84);
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .d-md-block {
        display: flex !important;
        flex-direction: column;
    }
}

main,
.sidebar {
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.main .row {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.profile {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding-bottom: 5px;
    overflow: hidden;
    flex-shrink: 0;

    background-color: var(--accent-3);
    padding: 10px;
    border-radius: 5px;
}

.profile .name {
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.profile .pfp {
    background-color: var(--white);
    color: black;
    border-radius: 8px;
    width: 35px;
    height: 35px;
    aspect-ratio: 1;
    flex: 0 0 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile .login-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.profile .login-text a {
    color: var(--text);
    text-decoration: none;
}

.profile .login-text:hover span:nth-child(2) {
    height: 3px;
    margin-top: 4.5px;
    margin-bottom: 4.5px;
    transform: rotate(0deg);
    width: 100%;
}

.profile .login-text span:nth-child(2) {
    display: block;
    height: 2px;
    background-color: var(--white);
    width: 80%;
    transform: rotate(-3deg);
    margin: 5px 0px;

    transition: all 0.2s ease;
}

.profile .login-text span {
    cursor: default;
}

.profile .login-text span a:hover {
    font-weight: bold;
    cursor: pointer;
}

/* ─── Quick nav buttons (compact icon-only) ─────────────── */
/* Rácsba rendezve: minden sor teljes szélességet kitölt, a
   gombok egyforma szélesek — így sosem kelti az üres maradék
   hely azt az érzést, hogy "még egy pont beférne". */
.quick-nav-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 0.4rem;
}

.quick-nav-row .quick-nav-btn {
    width: 100%;
}

.quick-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s, color 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.quick-nav-btn:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-1px);
}

/* ─── Error page (http.cat) ─────────────────────────────── */

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem;
    text-align: center;
}

.error-page__cat {
    max-width: 500px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.error-page__cat:hover {
    transform: scale(1.02);
}

.error-page__home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.error-page__home:hover {
    background-color: var(--accent-2);
    transform: translateY(-1px);
    color: var(--white);
}

@media (max-width: 576px) {
    .error-page__cat {
        max-width: 320px;
    }
}

/* Fallback, ha a http.cat kép nem tölt be (pl. külső szolgáltatás elérhetetlen) */
.error-page__cat-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.error-page__cat-fallback i {
    font-size: 3.5rem;
    color: var(--text-faint);
}

.error-page__cat-fallback p {
    margin: 0;
    font-weight: 600;
}

/* ─── Globális fókuszjelzés ─────────────────────────────── */

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

/* ─── Csökkentett mozgás ────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}