:root {
    --brown: #59351f;
    --brown-dark: #2a1a12;
    --brown-deep: #17110e;

    --cream: #f3e8d5;
    --sand: #d9c3a5;

    --amber: #cf8b36;
    --amber-light: #e3a64f;

    --surface: rgba(47, 32, 24, 0.93);
    --surface-soft: #38261d;
    --surface-hover: #453025;

    --border: #60422f;

    --text: #f8eee1;
    --text-secondary: #c4ad99;

    --success: #85c66a;
    --error: #ed8c79;

    --radius-large: 18px;
    --radius-medium: 12px;
    --radius-small: 8px;
}


* {
    box-sizing: border-box;
}


html {
    background:
        var(--brown-deep);
}


body {
    margin: 0;

    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color:
        var(--text);

    background:
        radial-gradient(
            circle at top,
            #3b2417 0%,
            #21150f 35%,
            #120d0a 100%
        );

    background-attachment:
        fixed;

    overflow-x:
        hidden;
}


/* ==========================
   LÚPULOS DE FONDO
   ========================== */

.hop-decoration {
    position: fixed;

    width: 380px;
    height: 380px;

    background-image:
        url("../img/hops-background.png");

    background-size:
        contain;

    background-repeat:
        no-repeat;

    opacity: 0.10;

    pointer-events:
        none;

    z-index: 0;
}


.hop-left {
    top: -80px;
    left: -130px;

    transform:
        rotate(-15deg);
}


.hop-right {
    top: 20px;
    right: -150px;

    transform:
        rotate(25deg);
}


/* ==========================
   CONTENEDOR
   ========================== */

.page {
    position: relative;

    z-index: 1;

    width:
        min(
            calc(100% - 32px),
            820px
        );

    margin:
        0 auto;

    padding:
        30px
        0
        55px;
}


/* ==========================
   MARCA
   ========================== */

.brand-header {
    text-align: center;

    padding:
        15px
        20px
        34px;
}


.brand-logo {
    width:
        min(
            330px,
            80vw
        );

    height: auto;

    display: block;

    margin:
        0 auto;
}


.music-title {
    margin-top:
        4px;

    font-size:
        2.2rem;

    font-weight:
        800;

    font-style:
        italic;

    letter-spacing:
        0.05em;

    color:
        var(--amber-light);

    transform:
        rotate(-2deg);
}


.brand-slogan {
    margin:
        18px
        auto
        0;

    max-width:
        420px;

    text-transform:
        uppercase;

    font-size:
        0.92rem;

    font-weight:
        700;

    letter-spacing:
        0.20em;

    line-height:
        1.6;

    color:
        var(--cream);
}


/* ==========================
   TARJETAS
   ========================== */

.card {
    margin-bottom:
        20px;

    padding:
        22px;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-large);

    background:
        var(--surface);

    box-shadow:
        0
        12px
        34px
        rgba(
            0,
            0,
            0,
            0.28
        );

    backdrop-filter:
        blur(4px);
}


.section-header {
    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        15px;

    margin-bottom:
        18px;
}


.section-header h2 {
    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    margin:
        0;

    color:
        var(--cream);

    font-size:
        1.35rem;

    text-transform:
        uppercase;

    letter-spacing:
        0.08em;
}


.section-icon {
    color:
        var(--amber-light);

    font-size:
        1.5rem;
}


.section-note {
    color:
        var(--text-secondary);

    font-size:
        0.85rem;
}


/* ==========================
   ESTADO SPOTIFY
   ========================== */

.playback-status {
    padding:
        6px
        11px;

    border:
        1px solid
        #496c3e;

    border-radius:
        999px;

    color:
        #94d77c;

    font-size:
        0.75rem;

    font-weight:
        700;

    text-transform:
        uppercase;

    letter-spacing:
        0.08em;
}


.playback-status.paused {
    border-color:
        #7c6748;

    color:
        var(--sand);
}


/* ==========================
   SONANDO AHORA
   ========================== */

.current-track {
    display:
        flex;

    gap:
        20px;

    align-items:
        center;
}


.current-track img {
    width:
        120px;

    height:
        120px;

    object-fit:
        cover;

    flex-shrink:
        0;

    border-radius:
        var(--radius-medium);

    box-shadow:
        0
        6px
        22px
        rgba(
            0,
            0,
            0,
            0.45
        );
}


.current-track .track-name {
    font-size:
        1.35rem;
}


/* ==========================
   PROGRESO
   ========================== */

.progress-times {
    display:
        flex;

    justify-content:
        space-between;

    margin-top:
        12px;

    color:
        var(--text-secondary);

    font-size:
        0.78rem;
}


.progress {
    margin-top:
        6px;

    height:
        7px;

    overflow:
        hidden;

    border-radius:
        999px;

    background:
        #5a4335;
}


.progress-bar {
    width:
        0;

    height:
        100%;

    background:
        linear-gradient(
            90deg,
            var(--amber),
            var(--amber-light)
        );

    border-radius:
        999px;

    transition:
        width
        0.5s linear;
}


/* ==========================
   BUSCADOR
   ========================== */

.search-row {
    display:
        flex;

    gap:
        12px;
}


.search-row input {
    flex:
        1;

    min-width:
        0;

    padding:
        14px
        16px;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-medium);

    outline:
        none;

    background:
        #160f0c;

    color:
        var(--text);

    font-size:
        1rem;

    transition:
        border-color
        0.2s ease,
        box-shadow
        0.2s ease;
}


.search-row input::placeholder {
    color:
        #927b68;
}


.search-row input:focus {
    border-color:
        var(--amber);

    box-shadow:
        0
        0
        0
        3px
        rgba(
            207,
            139,
            54,
            0.15
        );
}


/* ==========================
   BOTONES
   ========================== */

button {
    border:
        0;

    border-radius:
        var(--radius-medium);

    padding:
        12px
        18px;

    cursor:
        pointer;

    font-size:
        0.94rem;

    font-weight:
        700;

    transition:
        transform
        0.15s ease,
        background
        0.15s ease,
        opacity
        0.15s ease;
}


.primary-button,
.track button {
    color:
        #1d120c;

    background:
        linear-gradient(
            135deg,
            var(--amber-light),
            var(--amber)
        );

    box-shadow:
        inset
        0
        1px
        0
        rgba(
            255,
            255,
            255,
            0.25
        );
}


button:hover:not(:disabled) {
    transform:
        translateY(-1px);

    filter:
        brightness(1.08);
}


button:disabled {
    cursor:
        not-allowed;

    opacity:
        0.5;
}


/* ==========================
   CANCIONES
   ========================== */

.track-list {
    display:
        grid;

    gap:
        10px;
}


.track {
    display:
        flex;

    align-items:
        center;

    gap:
        13px;

    padding:
        11px;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.04
        );

    border-radius:
        var(--radius-medium);

    background:
        var(--surface-soft);

    transition:
        background
        0.2s ease,
        border-color
        0.2s ease;
}


.track:hover {
    background:
        var(--surface-hover);

    border-color:
        var(--border);
}


.track-number {
    width:
        24px;

    flex-shrink:
        0;

    text-align:
        center;

    color:
        var(--cream);

    font-weight:
        700;
}


.track img {
    width:
        64px;

    height:
        64px;

    flex-shrink:
        0;

    object-fit:
        cover;

    border-radius:
        var(--radius-small);
}


.track-info {
    flex:
        1;

    min-width:
        0;
}


.track-name {
    margin:
        0
        0
        5px;

    overflow:
        hidden;

    color:
        var(--text);

    font-size:
        1rem;

    font-weight:
        700;

    white-space:
        nowrap;

    text-overflow:
        ellipsis;
}


.track-artist {
    margin:
        0;

    overflow:
        hidden;

    color:
        var(--text-secondary);

    font-size:
        0.90rem;

    white-space:
        nowrap;

    text-overflow:
        ellipsis;
}


.track button {
    flex-shrink:
        0;
}


/* ==========================
   MENSAJES
   ========================== */

.message {
    margin-top:
        14px;

    line-height:
        1.45;
}


.message.success {
    padding:
        12px
        14px;

    border:
        1px solid
        rgba(
            133,
            198,
            106,
            0.35
        );

    border-radius:
        var(--radius-medium);

    background:
        rgba(
            133,
            198,
            106,
            0.08
        );

    color:
        #a9dd95;
}


.message.error {
    padding:
        12px
        14px;

    border:
        1px solid
        rgba(
            237,
            140,
            121,
            0.35
        );

    border-radius:
        var(--radius-medium);

    background:
        rgba(
            237,
            140,
            121,
            0.08
        );

    color:
        var(--error);
}


.muted {
    color:
        var(--text-secondary);
}


.hidden {
    display:
        none;
}


/* ==========================
   FOOTER
   ========================== */

.footer {
    display:
        grid;

    grid-template-columns:
        1fr
        auto
        1fr;

    align-items:
        center;

    gap:
        15px;

    margin-top:
        32px;

    padding:
        20px
        10px;

    color:
        var(--sand);

    text-align:
        center;

    text-transform:
        uppercase;

    letter-spacing:
        0.16em;

    font-size:
        0.70rem;
}


.footer strong {
    display:
        block;

    color:
        var(--cream);
}


.footer span {
    display:
        block;

    margin-top:
        5px;
}


.footer-hop {
    text-align:
        left;

    color:
        var(--amber);

    font-size:
        2rem;
}


.footer-since {
    text-align:
        right;
}


/* ==========================
   MOBILE
   ========================== */

@media (
    max-width: 600px
) {

    .page {
        width:
            calc(100% - 18px);

        padding-top:
            18px;
    }


    .hop-decoration {
        width:
            270px;

        height:
            270px;
    }


    .brand-logo {
        width:
            min(
                280px,
                82vw
            );
    }


    .music-title {
        font-size:
            1.8rem;
    }


    .brand-slogan {
        font-size:
            0.72rem;
    }


    .card {
        padding:
            16px;

        border-radius:
            15px;
    }


    .section-header {
        align-items:
            flex-start;
    }


    .section-header h2 {
        font-size:
            1rem;
    }


    .section-note {
        display:
            none;
    }


    .playback-status {
        font-size:
            0.62rem;
    }


    .current-track {
        gap:
            13px;
    }


    .current-track img {
        width:
            90px;

        height:
            90px;
    }


    .current-track .track-name {
        font-size:
            1.05rem;
    }


    .search-row {
        flex-direction:
            column;
    }


    .search-row button {
        width:
            100%;
    }


    .track {
        gap:
            9px;

        padding:
            10px;
    }


    .track img {
        width:
            54px;

        height:
            54px;
    }


    .track button {
        padding:
            10px;

        font-size:
            0.82rem;
    }


    .track-number {
        width:
            18px;
    }


    .footer {
        grid-template-columns:
            1fr;

        text-align:
            center;
    }


    .footer-hop,
    .footer-since {
        text-align:
            center;
    }
}

/* ==========================================================
   FIX RESPONSIVE - SEARCH RESULTS / QUEUE
   ========================================================== */

.card {
    min-width: 0;
    max-width: 100%;
}

.track-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    grid-template-columns:
        minmax(0, 1fr);
}

.track {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    overflow: hidden;
}

.track-info {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.track-name,
.track-artist {
    max-width: 100%;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 600px) {

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

    .page {
        width: calc(100% - 18px);
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .track-list {
        width: 100%;
        max-width: 100%;
        min-width: 0;

        grid-template-columns:
            minmax(0, 1fr);
    }

    .track {
        width: 100%;
        max-width: 100%;
        min-width: 0;

        gap: 9px;
        padding: 10px;

        overflow: hidden;
    }

    .track img {
        width: 52px;
        height: 52px;

        min-width: 52px;
        max-width: 52px;

        flex: 0 0 52px;
    }

    .track-number {
        width: 18px;
        min-width: 18px;

        flex: 0 0 18px;
    }

    .track-info {
        flex: 1 1 0;

        width: 0;
        min-width: 0;
        max-width: 100%;

        overflow: hidden;
    }

    .track-name,
    .track-artist {
        display: block;

        width: 100%;
        max-width: 100%;

        overflow: hidden;

        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .track button {
        flex: 0 0 auto;

        max-width: 92px;

        padding:
            10px
            12px;

        font-size:
            0.82rem;

        white-space:
            nowrap;
    }
}
