/* ==========================================================================
   === ZMIENNE I PODSTAWA (Styl Kakuen Music) === 
   ========================================================================== */
:root {
    --bg-dark: #050505;
    --bg-light: #f9f9f9;
    --text-dark: #f5f5f5;
    --text-light: #111111;
    --accent: #e60000;
    --accent-light: #ff3333;
    --accent-muted: #990000;
    --surface-dark: rgba(20, 20, 20, 0.6);
    --surface-light: rgba(255, 255, 255, 0.85);
    --border-dark: rgba(230, 0, 0, 0.2);
    --border-light: rgba(0, 0, 0, 0.08);
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--bg-light);
    color: var(--text-light);
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

body.dark {
    background: var(--bg-dark);
    color: var(--text-dark);
}

/* === TŁO ANIMOWANE === */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 20%, rgba(230, 0, 0, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(230, 0, 0, 0.04) 0%, transparent 40%),
        #f4f4f4;
}

body.dark .bg-animation {
    background: 
        radial-gradient(circle at 10% 20%, rgba(230, 0, 0, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(230, 0, 0, 0.08) 0%, transparent 45%),
        #040404;
}

/* === HEADER === */
header {
    position: sticky;
    top: 0;
    z-index: 9999;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 40px;
    box-sizing: border-box;
}

body.dark header {
    background: rgba(5, 5, 5, 0.85);
    border-bottom: 1px solid var(--border-dark);
}

/* === LOGO === */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
}

.logo span {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-light);
    font-size: 16px;
}

body.dark .logo span {
    color: var(--text-dark);
}

/* === NAWIGACJA (Desktop) === */
nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-btn {
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.25s ease;
}

body.dark .nav-btn {
    color: var(--text-dark);
}

.nav-btn:hover {
    color: #fff;
    background: var(--accent);
}

/* === STYL PANELU KONTROLNEGO (.controls) === */
.controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-group {
    display: flex;
    gap: 6px;
}

.theme-btn, .lang-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
}

body.dark .theme-btn, body.dark .lang-btn {
    border-color: var(--border-dark);
    color: var(--text-dark);
}

.theme-btn:hover, .lang-btn:hover {
    background: rgba(230, 0, 0, 0.1);
    border-color: var(--accent);
}

/* === SOCIAL BUTTONS === */
.social-group {
    display: flex;
    gap: 6px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 12px 20px;
    border-radius: 50px;

    text-decoration: none;
    color: #fff !important;

    font-size: 13px;
    font-weight: 600;

    transition: transform 0.3s ease,
                filter 0.3s ease;
}

.social-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.social-btn:hover {
    transform: translateY(-5px);
    filter: brightness(1.2);
}

.social-btn.spotify     { background: #1DB954; }
.social-btn.tidal       { background: #000000; border: 1px solid rgba(255,255,255,0.15); }
.social-btn.apple_music { background: #FC3C44; }
.social-btn.youtube     { background: #FF0000; }
.social-btn.bandcamp    { background: #629AA9; }
.social-btn.instagram   { background: #E1306C; }

/* === HAMBURGER MODIFIERS === */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 4px;
    z-index: 10000; /* Zawsze nad wszystkim */
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text-light);
    transition: all 0.3s ease;
}

body.dark .hamburger span {
    background: var(--text-dark);
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); background: var(--accent); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background: var(--accent); }

/* ==========================================================================
   === ARCHITEKTURA STRONY (Identyczna jak na Kakuen Music — jedna kolumna) === 
   ========================================================================== */
main {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; 
    gap: 40px !important; 
    max-width: 100% !important;
    padding: 40px 20px !important;
    box-sizing: border-box !important;
    margin: 0 auto;
}

/* Wymuszenie struktury pionowej i naprawa niedomkniętych tagów HTML */
main #music ~ .reveal,
main #album, 
main [id^="album-"],
.reveal {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important; 
    opacity: 1 !important; 
    box-sizing: border-box !important;
}

/* === HERO === */
.hero {
    text-align: center;
    padding: 80px 20px;
    width: 100% !important;
    max-width: 800px !important;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(32px, 6vw, 64px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 16px 0;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(230, 0, 0, 0.15);
}

.hero p {
    font-size: 18px;
    letter-spacing: 0.02em;
    opacity: 0.8;
}

/* === KARTY I ALBUMY (Maksymalnie wyśrodkowane jak na wzorcu) === */
.card {
    background: var(--surface-light);
    border: 1px solid var(--border-light);
    border-top: 4px solid var(--accent);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 800px !important; /* Idealna, zablokowana szerokość bloków */
    margin: 0 auto !important; 
    height: auto !important; 
    display: block !important; 
}

body.dark .card {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-top: 4px solid var(--accent);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(230, 0, 0, 0.1);
}

.card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: 0.03em;
    text-align: left !important;
}

#about .card, #music .card {
    max-width: 800px !important;
}

/* Okładki płyt */
.album-card figure {
    margin: 20px 0 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

.album-card img {
    width: 100% !important;
    max-width: 280px !important; 
    height: 280px !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tracklista */
.tracklist {
    display: block !important;
    margin: 24px 0 0 0 !important;
    padding-left: 24px !important;
    list-style: decimal !important;
}

.tracklist li {
    display: list-item !important; 
    font-size: 14px;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
    text-align: left !important;
}

body.dark .tracklist li {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.tracklist li:last-child {
    border-bottom: none;
}

.tracklist li::marker {
    color: var(--accent);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

/* === FOOTER === */
/* --- FOOTER STYLING --- */
footer {
    padding: 40px 20px;
    background: var(--bg-secondary); /* Upewnij się, że masz tę zmienną w :root */
    border-top: 1px solid var(--border-light);
    margin-top: 50px;
    text-align: center;
}

body.dark footer {
    background: #0f0f0f;
    border-top: 1px solid var(--border-dark);
}

.footer-wrap {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.footer-left h3 {
    margin: 0 0 10px 0;
    font-family: 'Orbitron', sans-serif;
    color: var(--text-light);
}

.footer-left p {
    font-size: 13px;
    opacity: 0.7;
    margin: 5px 0;
}

/* --- FOOTER LINKS (Kapsułki) --- */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

body.dark .footer-links a {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dark);
}

.footer-links a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* Ikony wewnątrz linków */
.footer-links a i {
    font-size: 15px;
}

/* Responsywność dla małych ekranów */
@media (max-width: 600px) {
    .footer-links {
        gap: 8px;
    }
    .footer-links a {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ==========================================================================
   === SYSTEM INTERFEJSU MOBILNEGO + OBSŁUGA OVERLAY I PRZYCISKU X ==========
   ========================================================================== */

/* Podstawa warstwy przyciemniającej — widoczna globalnie, aby unikać błędów kolejności HTML */
.menu-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    z-index: 9997 !important; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    pointer-events: none;
}

@media (max-width: 767px) {
    header {
        padding: 14px 20px;
    }

    .hamburger {
        display: flex;
    }

    /* Wysuwany boczny panel menu */
    nav {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 300px !important;
        height: 100vh !important;
        background: #fff !important;
        z-index: 9998 !important; 
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: 100px 30px 40px 30px !important;
        gap: 30px !important;
        box-sizing: border-box !important;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: -10px 0 30px rgba(0,0,0,0.05) !important;
    }

    body.dark nav {
        background: #0a0a0a !important;
        box-shadow: -10px 0 40px rgba(0,0,0,0.6) !important;
    }

    /* Stan otwarty menu (wywoływany przez Twój skrypt JS) */
    nav.open {
        transform: translateX(0);
    }

    /* INTELLIGENT OBSŁUGA OVERLAY: 
       Jeśli nav ma klasę .open, lub całe body wykryje stan otwarcia, tło natychmiast się aktywuje 
    */
    nav.open ~ .menu-overlay,
    body:has(nav.open) .menu-overlay,
    .menu-overlay:has(~ nav.open) {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important; /* Reaguje na kliknięcia zamykające */
    }

    /* GENEROWANIE PRZYCISKU "X" W PRAWYM GÓRNYM ROGU PANELU MENU */
/* Elementy wewnątrz menu mobilnego */
    .nav-links {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .nav-btn {
        width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
        padding: 12px 16px !important;
        background: rgba(0,0,0,0.02) !important;
    }

    body.dark .nav-btn {
        background: rgba(255,255,255,0.02) !important;
    }

    .controls {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 20px !important;
        display: none !important; 
    }

    .controls.open {
        display: flex !important;
    }

    .btn-group {
        width: 100% !important;
    }

    .theme-btn {
        flex: 0 0 50px !important;
    }

    .lang-btn {
        flex: 1 !important;
        text-align: center !important;
    }

    .social-group {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .social-btn {
        text-align: center !important;
        padding: 10px 4px !important;
        font-size: 12px !important;
    }

    .footer-wrap {
        flex-direction: column !important;
        text-align: center !important;
    }

    .footer-links {
        justify-content: center !important;
    }
}
/* ==========================================================================
   === MOBILNE ASPEKTY WIZUALNE DLA PRZYCISKU X ORAZ OVERLAY ================
   ========================================================================== */

/* Wygląd warstwy zaciemniającej tło */
.menu-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    z-index: 9997 !important; /* Pod menu, ale nad stroną */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

/* Pokazywanie tła gdy jest aktywne */
.menu-overlay.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

@media (max-width: 767px) {
    /* Upewniamy się, że wysuwany nav ma prawidłowe pozycjonowanie warstw */
    nav {
        z-index: 9998 !important;
    }

    /* Wygląd pojedynczej ikony X generowanej przez skrypt JS */
    .close-menu-btn {
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        font-size: 20px !important;
        font-weight: bold !important;
        color: var(--text-light) !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        background: rgba(0, 0, 0, 0.05) !important;
        cursor: pointer !important;
        z-index: 10000 !important;
        transition: all 0.2s ease !important;
    }

    /* Kolorystyka przycisku X w trybie nocnym */
    body.dark .close-menu-btn {
        color: var(--text-dark) !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }

    /* Efekt najechania/tapnięcia na X */
    .close-menu-btn:hover {
        background: var(--accent) !important;
        color: #ffffff !important;
    }
}
/* Ukrywa oryginalny, czerwony krzyżyk hamburgera, gdy menu jest otwarte */
.hamburger.open {
    display: none !important;
}
/* Domyślnie ukrywamy przycisk X na komputerach i dużych ekranach */
.close-menu-btn {
    display: none !important;
}

/* Pokazujemy przycisk X wyłącznie na urządzeniach mobilnych */
@media (max-width: 767px) {
    .close-menu-btn {
        display: flex !important; /* Przywraca widoczność tylko na telefonie */
    }
}

/* ==========================================
   NAPRAWA POZIOMEGO PRZEWIJANIA
   ========================================== */

html,
body {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}
