/* =================== ANDRZEJKI – STYL =================== */
/* Reset i ogólne */
* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #fff;
}

html,
body {
    margin: 0;
    padding: 0;
    background-color: #121212;
}

body.bg {
    display: flex;
    justify-content: center;
    padding: 24px;
}

/* Karta główna */
.card {
    width: 100%;
    max-width: 720px;
    background-color: #000;
    border-radius: 16px;
    padding: 24px 20px 80px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Nagłówek */
.header {
    margin-bottom: 24px;
    text-align: center;
}

.event-title {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 600;
    color: #fff;
}

.event-sub {
    margin-top: 4px;
    color: #b3b3b3;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
}

/* Szukajka */
.search-block {
    background-color: #181818;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 24px;
}

.label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    color: #b3b3b3;
    margin-bottom: 6px;
}

.search-input {
    width: 100%;
    background-color: #282828;
    border: 1px solid #3a3a3a;
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    padding: 12px 14px;
    outline: none;
}

.search-input:focus {
    border-color: #1DB954;
    box-shadow: 0 0 0 3px rgba(29, 185, 84, .3);
}

.hint {
    font-size: .75rem;
    color: #777;
    margin-top: 8px;
    line-height: 1.4;
}

/* Wyniki */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Pojedynczy wynik */
.result-row {
    background-color: #181818;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color .15s;
}

.result-row:hover {
    background-color: #1f1f1f;
}

.album-art {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    flex-shrink: 0;
    object-fit: cover;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-title {
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.track-artist {
    font-size: .8rem;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Guzik Dodaj */
.add-btn {
    background-color: #1DB954;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    color: #000;
    min-width: 90px;
    text-align: center;
    transition: background-color .12s, box-shadow .12s;
    flex-shrink: 0;
}

.add-btn:hover:not(:disabled) {
    background-color: #1ed760;
    box-shadow: 0 8px 24px rgba(29, 185, 84, .4);
}

.add-btn:disabled {
    filter: grayscale(1);
    opacity: .6;
    cursor: default;
}

/* Stopka */
.footer {
    position: relative;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    text-align: center;
}

.smallprint {
    font-size: .7rem;
    color: #555;
    line-height: 1.4;
}

/* ======================== RESPONSYWNOŚĆ MOBILNA ======================== */
@media (max-width: 600px) {
    body.bg {
        padding: 16px;
    }

    .card {
        padding: 16px 14px 60px;
        border-radius: 12px;
    }

    .result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .album-art {
        width: 72px;
        height: 72px;
        align-self: center;
    }

    .track-info {
        text-align: center;
        width: 100%;
    }

    .track-title {
        font-size: 1rem;
    }

    .track-artist {
        font-size: .85rem;
        white-space: normal;
    }

    .add-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .hint {
        text-align: center;
        font-size: .8rem;
    }
}

@media (max-width: 360px) {
    .event-title {
        font-size: 1.1rem;
    }

    .event-sub {
        font-size: .8rem;
    }
}

/* Blok z utworem + player */
.result-block {
    display: flex;
    flex-direction: column;
}

/* Dodatkowy przycisk podglądu */
.preview-btn {
    background-color: #282828;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .8rem;
    color: #fff;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}

.preview-btn:hover {
    background-color: #3a3a3a;
    border-color: #555;
}

/* Player Spotify */
.track-player {
    width: 100%;
    height: 80px;
    border: none;
    border-radius: 10px;
    margin-top: 8px;
    margin-bottom: 14px;
    background-color: #181818;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.track-player:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
}

/* Układ guzików */
.buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (max-width: 600px) {
    .buttons {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }

    .preview-btn,
    .add-btn {
        flex: 1;
    }

    .track-player {
        height: 100px;
    }
}