/* Efekt dla logo */

header img {
    transition: all 0.3s ease; /* Płynne przejście */
}

header img:hover {
    filter: brightness(1.2); /* Rozjaśnienie o 20% */
    transform: scale(1.02);   /* Delikatne powiększenie */
}

header img:active {
    transform: scale(0.98);   /* Efekt kliknięcia (wciśnięcia) */
    filter: brightness(0.9);
}
/* --- OGÓLNE USTAWIENIA --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #111827;
    color: #e5e7eb;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

/* --- PRZYCISKI WYBORU (Format i Mode) --- */
.format-btn,
.mode-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background-color: #374151;
    color: #9ca3af;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    /* Zapobiega łamaniu tekstu w przycisku */
}

.format-btn:hover,
.mode-btn:hover {
    background-color: #4b5563;
    color: #f3f4f6;
}

.format-btn.active,
.mode-btn.active {
    background-color: #2563eb;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

/* --- STREFA UPLOAD --- */
#uploadZone {
    transition: all 0.3s ease;
}

#uploadZone:hover {
    border-color: #3b82f6;
    background-color: rgba(55, 65, 81, 0.5);
}

/* --- WYNIKI (Karty Stems) --- */
#stemsContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.stem-card {
    background-color: #1f2937;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #374151;
    transition: all 0.3s ease;
    flex: 0 1 320px;
    /* Szerokość karty na PC */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stem-card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.stem-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #60a5fa;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
    letter-spacing: 0.05em;
}

/* --- ODTWARZACZ AUDIO --- */
audio {
    width: 100%;
    height: 40px;
    margin-bottom: 1.25rem;
    filter: invert(1) hue-rotate(180deg) brightness(1.5);
    /* Ciemny motyw dla playera */
}

/* --- PRZYCISK POBIERANIA --- */
.download-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    font-weight: 700;
    padding: 0.8rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.download-btn:hover {
    opacity: 0.9;
}

/* --- RESPONSYWNOŚĆ (TELEFONY) --- */
@media (max-width: 640px) {
    .container {
        padding: 0.5rem;
        /* Więcej miejsca na boki */
    }

    .h-32 {
        height: 4rem !important;
    }

    .p-8 {
        padding: 1rem !important;
    }

    .p-12 {
        padding: 1.5rem 0.5rem !important;
    }

    /* Kluczowa poprawka, żeby 3 przyciski weszły obok siebie */
    .flex.gap-3 {
        gap: 0.3rem !important;
        /* Minimalne odstępy między przyciskami */
    }

    .format-btn,
    .mode-btn {
        padding: 0.6rem 0.2rem !important;
        /* Bardzo mały padding boczny */
        font-size: 0.65rem !important;
        /* Mała czcionka, żeby zmieścić "Instrumental" */
        border-radius: 0.5rem !important;
    }

    .stem-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
