
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* VARIABLES */

:root {
    --background: #141414;
    --surface: #222222;
    --text: #faf8f2;
    --purple: #c4a0ff;
    --orange: #ff6045;
    --lime: #dfff63;
    --pink: #ff83ba;
}

/* RESET */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
}

button,
select {
    font: inherit;
    cursor: pointer;
}

button {
    border: none;
    transition: transform .2s, background .2s;
}

button:hover {
    transform: translateY(-3px);
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
    outline: 3px solid var(--purple);
    outline-offset: 4px;
}

/* HEADER */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 5%;
    border-bottom: 1px solid #333;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 23px;
    letter-spacing: -1px;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
}

.logo span {
    color: var(--purple);
}

.logo-icon {
    margin-right: 5px;
}

.navigation {
    display: flex;
    gap: 8px;
}

.navigation button {
    background: transparent;
    color: #aaa;
    padding: 10px 15px;
    border-radius: 30px;
}

.navigation button.active {
    background: var(--text);
    color: var(--background);
    font-weight: 700;
}

.import-button {
    background: var(--lime);
    color: #141414;
    border-radius: 30px;
    padding: 12px 20px;
    font-weight: 700;
}

/* ESTRUCTURA */

main {
    max-width: 1500px;
    margin: auto;
    padding: 30px 5% 60px;
    min-height: 80vh;
}

.demo-banner {
    color: #bbb;
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: appear .4s ease;
}

/* HERO */

.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 390px;
    padding: 55px;
    background: var(--purple);
    color: #211039;
    border-radius: 28px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
}

h1 {
    font-size: clamp(42px, 6vw, 88px);
    line-height: .98;
    letter-spacing: -4px;
    font-weight: 900;
    margin: 20px 0;
}

.hero h1 em {
    font-style: normal;
    color: #6634ba;
}

.hero p {
    font-size: 18px;
    margin-bottom: 25px;
}

.primary-button {
    background: #211039;
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: 700;
}

/* VINILO */

.vinyl {
    position: absolute;
    right: -40px;
    bottom: -100px;
    width: 460px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle,
        #171717 0px,
        #171717 6px,
        #303030 7px,
        #171717 9px
    );
    display: grid;
    place-items: center;
    animation: spin 25s linear infinite;
}

.vinyl-center {
    display: grid;
    place-items: center;
    width: 35%;
    aspect-ratio: 1;
    background: var(--orange);
    border-radius: 50%;
    font-family: 'Outfit', sans-serif;
    font-size: 50px;
    font-weight: 900;
    color: #171717;
}

/* ENCABEZADOS */

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 40px 0 20px;
}

h2 {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -1.5px;
}

select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid #444;
    padding: 12px 18px;
    border-radius: 12px;
}

/* ESTADÍSTICAS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-card {
    border-radius: 22px;
    padding: 25px;
    color: #171717;
    transition: transform .25s;
    min-width: 0;
}

.stat-card:hover {
    transform: rotate(-2deg) translateY(-5px);
}

.stat-card span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.stat-card strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(30px, 3.5vw, 54px);
    font-weight: 900;
    letter-spacing: -2px;
    margin: 12px 0;
    overflow-wrap: anywhere;
}

.stat-card p {
    font-size: 13px;
}

.purple {
    background: var(--purple);
}

.orange {
    background: var(--orange);
}

.lime {
    background: var(--lime);
}

.pink {
    background: var(--pink);
}

/* RANKINGS */

.rankings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ranking-card {
    background: var(--surface);
    border-radius: 22px;
    padding: 25px;
    min-width: 0;
}

.ranking-card h3 {
    font-size: 28px;
    margin-bottom: 20px;
}

.ranking-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #383838;
}

.ranking-row:last-child {
    border-bottom: none;
}

.rank-number {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: var(--purple);
    min-width: 35px;
}

.rank-info {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.rank-info strong {
    display: block;
    font-size: 16px;
}

.rank-info small {
    color: #aaa;
}

.rank-value {
    font-size: 14px;
    color: #bbb;
    white-space: nowrap;
}

.empty-ranking {
    color: #aaa;
    padding: 20px 0;
}

/* WRAPPED */

.wrapped-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.wrapped-card {
    border-radius: 25px;
    padding: 35px;
    color: #141414;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wrapped-card strong {
    font-family: 'Outfit', sans-serif;
    font-size: 65px;
    font-weight: 900;
}

.wrapped-card button {
    background: #141414;
    color: white;
    border-radius: 30px;
    padding: 12px;
}

/* PLACEHOLDERS */

.placeholder {
    border: 2px dashed #555;
    border-radius: 24px;
    padding: 60px 20px;
    margin-top: 30px;
    text-align: center;
    color: #aaa;
}

/* IMPORTACIÓN */

.import-zone {
    background: var(--purple);
    color: #211039;
    border: 3px dashed #6634ba;
    border-radius: 28px;
    padding: 65px 25px;
    text-align: center;
    margin: 35px 0;
    transition: background .25s, transform .25s;
}

.import-zone.dragover {
    background: var(--lime);
    border-color: #141414;
    transform: scale(1.015);
}

.import-icon {
    width: 90px;
    height: 90px;
    background: #211039;
    color: var(--purple);
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 25px;
    font-size: 55px;
    font-weight: 900;
}

.import-zone h2 {
    margin-bottom: 12px;
}

.import-zone p {
    margin-bottom: 25px;
}

.import-zone small {
    display: block;
    margin-top: 20px;
    opacity: .7;
}

.import-status {
    padding: 20px 25px;
    border-radius: 18px;
    margin: 20px 0;
    background: var(--surface);
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.import-status.success {
    background: var(--lime);
    color: #141414;
}

.import-status.error {
    background: var(--orange);
    color: #141414;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

.data-card {
    padding: 30px;
    border-radius: 24px;
    color: #141414;
}

.data-card h3 {
    font-size: 28px;
    line-height: 1.1;
    margin-bottom: 15px;
}

.data-card p {
    line-height: 1.6;
}

.data-card a {
    display: inline-block;
    margin-top: 20px;
    color: #141414;
    font-weight: 700;
}

/* ALMACENAMIENTO */

.storage-panel {
    background: var(--surface);
    border-radius: 24px;
    padding: 30px;
    margin-top: 30px;
}

.storage-panel p {
    color: #bbb;
    margin: 15px 0 25px;
}

.storage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.secondary-button,
.danger-button {
    padding: 13px 20px;
    border-radius: 30px;
    font-weight: 700;
}

.secondary-button {
    background: var(--text);
    color: #141414;
}

.danger-button {
    background: var(--orange);
    color: #141414;
}

/* FOOTER */

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 5%;
    border-top: 1px solid #333;
    font-size: 13px;
    color: #888;
}

footer strong {
    color: var(--purple);
}

/* ANIMACIONES */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */

@media (max-width: 1000px) {

    .header {
        flex-wrap: wrap;
    }

    .navigation {
        order: 3;
        width: 100%;
        overflow-x: auto;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vinyl {
        opacity: .2;
    }
}

@media (max-width: 700px) {

    .data-grid {
        grid-template-columns: 1fr;
    }

    .import-zone {
        padding: 40px 20px;
    }

    .storage-panel {
        padding: 20px;
    }
}

@media (max-width: 600px) {

    .hero {
        padding: 30px;
        min-height: 340px;
    }

    h1 {
        letter-spacing: -2px;
    }

    .rankings-grid,
    .wrapped-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 18px;
    }

    .logo {
        font-size: 18px;
    }

    .import-button {
        font-size: 12px;
    }

    .section-heading {
        flex-wrap: wrap;
    }

    footer {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

label.primary-button {
    display: inline-block;
    cursor: pointer;
    transition: transform .2s;
}

label.primary-button:hover {
    transform: translateY(-3px);
}
/* v0.3 */
.filter-bar {display:flex;flex-wrap:wrap;gap:16px;margin:28px 0 16px;align-items:end}
.filter-bar label {display:grid;gap:8px;color:#bbb;font-size:13px;font-weight:700}
.filter-bar input {font:inherit;background:var(--surface);color:var(--text);border:1px solid #444;border-radius:12px;padding:13px 18px;min-width:0}
.muted {color:#aaa;margin:16px 0;line-height:1.5}
.advanced-grid {margin:24px 0}
.chart-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:start}
.chart-row {display:grid;grid-template-columns:45px minmax(0,1fr) 75px;align-items:center;gap:8px;margin:10px 0;font-size:12px}
.chart-row small {text-align:right;color:#bbb;overflow-wrap:anywhere}
.chart-track {height:12px;border-radius:8px;background:#383838;overflow:hidden}
.chart-fill {height:100%;background:var(--purple);border-radius:8px}
.chart-grid article:nth-child(2) .chart-fill {background:var(--lime)}
.chart-grid article:nth-child(3) .chart-fill {background:var(--orange)}
.ranking-link {display:block;width:100%;background:none;color:inherit;text-align:left;border-bottom:1px solid #383838;font:inherit}
.ranking-link:hover {transform:none;background:#303030}
.ranking-link .ranking-row {padding:14px 8px}
.history-row {display:flex;gap:16px;align-items:center;padding:15px 0;border-bottom:1px solid #383838}
.history-date {color:#bbb;font-size:12px}
.pagination {display:flex;justify-content:center;align-items:center;gap:18px;margin:24px 0}
#detail-dialog {margin:auto;width:min(600px,92vw);max-height:85vh;overflow:auto;background:var(--surface);color:var(--text);border:1px solid #555;border-radius:24px;padding:26px}
#detail-dialog::backdrop {background:#000b}
#detail-dialog h2,#detail-dialog h3 {margin:18px 0}
#close-detail {display:block;margin:0 0 20px auto}
#select-files[aria-disabled="true"] {opacity:.5;pointer-events:none}
@media(max-width:1000px){.chart-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.chart-grid{grid-template-columns:1fr}.history-row{flex-wrap:wrap}.history-row .rank-info{flex-basis:100%}.filter-bar label{flex:1;min-width:130px}}

/* ========================================
   v0.4 — WRAPPED EXPERIENCE
======================================== */

.wrapped-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 280px;
    transition: transform .3s ease;
}

.wrapped-card:hover {
    transform: translateY(-6px) rotate(-1deg);
}

.wrapped-card::after {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    border: 35px solid currentColor;
    border-radius: 50%;
    right: -100px;
    top: -90px;
    opacity: .09;
    z-index: -1;
}

.wrapped-card strong {
    font-size: clamp(40px, 5vw, 75px);
    line-height: 1;
    letter-spacing: -3px;
}

.wrapped-card p {
    font-size: 14px;
    font-weight: 600;
    margin: 15px 0;
}

.wrapped-card button {
    font-weight: 700;
    padding: 15px;
}

.wrapped-global {
    background: #dfff63;
    grid-column: 1 / -1;
    min-height: 300px;
}

.wrapped-global strong {
    font-size: clamp(45px, 7vw, 100px);
}


/* ========================================
   REPRODUCTOR
======================================== */

#wrapped-player {
    position: fixed;
    inset: 0;
    margin: auto;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border: none;
    padding: 0;
    background: #101010;
    color: #faf8f2;
    overflow: hidden;
}

#wrapped-player::backdrop {
    background: #101010;
}

.wp-shell {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px 4%;
    gap: 16px;
}

.wp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.wp-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.5px;
}

.wp-controls {
    display: flex;
    gap: 10px;
}

.wp-controls button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #292929;
    color: white;
    font-size: 23px;
    display: grid;
    place-items: center;
}

.wp-controls button:hover {
    background: #444;
}


/* ========================================
   BARRAS DE PROGRESO
======================================== */

.wp-progress {
    display: flex;
    gap: 5px;
}

.wp-segment {
    flex: 1;
    height: 5px;
    background: #383838;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.wp-segment-fill {
    height: 100%;
    width: 0%;
    background: #faf8f2;
    border-radius: 10px;
}

.wp-segment:hover {
    opacity: .7;
}


/* ========================================
   ESCENARIO
======================================== */

.wp-stage {
    --wp-bg: #c4a0ff;
    --wp-fg: #211039;
    --wp-accent: #6634ba;

    position: relative;
    flex: 1;
    min-height: 0;
    isolation: isolate;
    overflow: hidden;
    border-radius: 28px;
    background: var(--wp-bg);
    color: var(--wp-fg);
    transition: background .5s ease;
}

.wp-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: clamp(24px, 5vw, 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
}

.wp-content.wp-enter {
    animation: wp-enter .65s
        cubic-bezier(.16, 1, .3, 1) both;
}

.wp-kicker {
    font-size: clamp(11px, 1.2vw, 15px);
    letter-spacing: 3px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.wp-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(42px, 8vw, 125px);
    font-weight: 900;
    line-height: .95;
    letter-spacing: -.055em;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.wp-number {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(55px, 12vw, 180px);
    font-weight: 900;
    line-height: .95;
    letter-spacing: -.06em;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.wp-subtitle {
    font-size: clamp(16px, 2.3vw, 29px);
    line-height: 1.4;
    max-width: 750px;
    margin-top: 24px;
    font-weight: 500;
}

.wp-caption {
    font-size: 14px;
    font-weight: 700;
    margin-top: 18px;
    opacity: .7;
}

.wp-pill {
    display: inline-block;
    border: 2px solid currentColor;
    border-radius: 40px;
    padding: 10px 20px;
    font-weight: 700;
    margin-top: 25px;
}


/* ========================================
   DECORACIONES
======================================== */

.wp-decoration {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.wp-decoration::before,
.wp-decoration::after {
    content: "";
    position: absolute;
}

.wp-rings .wp-decoration::before {
    width: 55vw;
    aspect-ratio: 1;
    right: -12vw;
    bottom: -25vw;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle,
        transparent 0,
        transparent 22px,
        var(--wp-accent) 23px,
        var(--wp-accent) 45px
    );
    opacity: .35;
    animation: wp-float 6s ease-in-out infinite;
}

.wp-orbit .wp-decoration::before {
    width: 48vw;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 8vw solid var(--wp-accent);
    right: -15vw;
    top: -15vw;
    opacity: .25;
}

.wp-orbit .wp-decoration::after {
    width: 30vw;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--wp-accent);
    right: 10vw;
    bottom: -18vw;
    opacity: .25;
    animation: wp-float 5s ease-in-out infinite;
}

.wp-stripes .wp-decoration::before {
    width: 70%;
    height: 150%;
    right: -25%;
    top: -25%;
    background: repeating-linear-gradient(
        45deg,
        transparent 0,
        transparent 35px,
        var(--wp-accent) 35px,
        var(--wp-accent) 70px
    );
    opacity: .18;
    transform: rotate(-15deg);
}

.wp-record .wp-decoration::before {
    width: 48vw;
    aspect-ratio: 1;
    border-radius: 50%;
    right: -10vw;
    bottom: -15vw;
    background: repeating-radial-gradient(
        circle,
        #141414 0px,
        #141414 8px,
        #333 9px,
        #141414 12px
    );
    opacity: .18;
    animation: spin 20s linear infinite;
}

.wp-stars .wp-decoration::before {
    content: "✦";
    font-size: 65vw;
    line-height: 1;
    right: -12vw;
    bottom: -22vw;
    color: var(--wp-accent);
    opacity: .25;
    animation: spin 40s linear infinite;
}


/* ========================================
   PALETAS
======================================== */

.wp-theme-purple {
    --wp-bg: #c4a0ff;
    --wp-fg: #211039;
    --wp-accent: #6634ba;
}

.wp-theme-orange {
    --wp-bg: #ff6045;
    --wp-fg: #27100a;
    --wp-accent: #9c2510;
}

.wp-theme-lime {
    --wp-bg: #dfff63;
    --wp-fg: #263300;
    --wp-accent: #839d16;
}

.wp-theme-pink {
    --wp-bg: #ff83ba;
    --wp-fg: #420e29;
    --wp-accent: #bf276c;
}

.wp-theme-dark {
    --wp-bg: #202020;
    --wp-fg: #faf8f2;
    --wp-accent: #c4a0ff;
}


/* ========================================
   RANKINGS DEL WRAPPED
======================================== */

.wp-list {
    display: grid;
    gap: 10px;
    width: min(850px, 100%);
    margin-top: 25px;
}

.wp-list-row {
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid currentColor;
    padding: 10px 0;
    animation: wp-enter .5s both;
}

.wp-list-rank {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(26px, 4vw, 55px);
    font-weight: 900;
    opacity: .5;
    min-width: 45px;
}

.wp-list-info {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.wp-list-info strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(18px, 3vw, 38px);
    font-weight: 800;
}

.wp-list-info small {
    display: block;
    font-size: 13px;
    opacity: .7;
}

.wp-list-value {
    font-weight: 700;
    white-space: nowrap;
    font-size: clamp(12px, 1.6vw, 18px);
}


/* ========================================
   RESUMEN FINAL
======================================== */

.wp-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    width: min(900px, 100%);
    margin-top: 25px;
}

.wp-summary-card {
    border: 2px solid currentColor;
    border-radius: 20px;
    padding: clamp(14px, 2vw, 25px);
    min-width: 0;
}

.wp-summary-card span {
    display: block;
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 8px;
}

.wp-summary-card strong {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(22px, 4vw, 48px);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.wp-replay {
    background: #141414;
    color: white;
    border-radius: 40px;
    padding: 15px 25px;
    margin-top: 25px;
    font-weight: 700;
}


/* ========================================
   NAVEGACIÓN
======================================== */

.wp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border: none;
    gap: 10px;
}

.wp-footer button {
    background: #292929;
    color: white;
    border-radius: 30px;
    padding: 12px 20px;
    font-weight: 700;
}

#wp-counter {
    color: #aaa;
    font-size: 13px;
    white-space: nowrap;
}


/* ========================================
   ANIMACIONES
======================================== */

@keyframes wp-enter {
    from {
        opacity: 0;
        transform: translateY(35px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes wp-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-25px);
    }
}

.wp-paused .wp-decoration::before,
.wp-paused .wp-decoration::after,
.wp-paused .wp-content,
.wp-paused .wp-list-row {
    animation-play-state: paused;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 700px) {

    .wp-shell {
        padding: 12px;
        gap: 12px;
    }

    .wp-brand {
        font-size: 14px;
    }

    .wp-controls {
        gap: 5px;
    }

    .wp-controls button {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .wp-stage {
        border-radius: 20px;
    }

    .wp-content {
        padding: 25px;
    }

    .wp-list-row {
        gap: 10px;
    }

    .wp-list-rank {
        min-width: 30px;
    }

    .wp-summary {
        gap: 8px;
    }

    .wp-footer button {
        font-size: 12px;
        padding: 10px 14px;
    }

    .wp-decoration {
        opacity: .6;
    }
}

@media (max-height: 650px) {

    .wp-content {
        justify-content: safe center;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .wp-title {
        font-size: clamp(30px, 6vw, 65px);
    }

    .wp-list {
        gap: 3px;
        margin-top: 12px;
    }

    .wp-list-row {
        padding: 5px 0;
    }

    .wp-list-info strong {
        font-size: clamp(16px, 2vw, 26px);
    }

    .wp-list-rank {
        font-size: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .wp-content,
    .wp-list-row,
    .wp-decoration::before,
    .wp-decoration::after {
        animation: none !important;
    }

    .wp-stage {
        transition: none;
    }
}

/* ========================================
   v0.5 — MAKE IT YOURS
======================================== */

.header {
    flex-wrap: wrap;
}

.navigation {
    flex-wrap: wrap;
    justify-content: center;
}

.navigation button {
    white-space: nowrap;
    padding: 10px 12px;
}


/* PALETAS PERSONALIZADAS */

:root[data-theme="midnight"] {
    --purple: #a9a0ff;
    --orange: #a8c7fa;
    --lime: #c3d6ff;
    --pink: #e0b0ff;
}

:root[data-theme="cherry"] {
    --purple: #ff829b;
    --orange: #ff9a76;
    --lime: #ffd1d9;
    --pink: #ff5f91;
}

:root[data-theme="ocean"] {
    --purple: #8bc8ff;
    --orange: #7ce0d3;
    --lime: #b6f5cc;
    --pink: #b7b6ff;
}

:root[data-theme="sunset"] {
    --purple: #ffb1df;
    --orange: #ff9d67;
    --lime: #ffe477;
    --pink: #ff8598;
}

.wrapped-global {
    background: var(--lime);
}

.wp-theme-purple {
    --wp-bg: var(--purple);
}

.wp-theme-orange {
    --wp-bg: var(--orange);
}

.wp-theme-lime {
    --wp-bg: var(--lime);
}

.wp-theme-pink {
    --wp-bg: var(--pink);
}


/* CONFIGURACIÓN */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 35px;
}

.settings-card {
    background: var(--surface);
    border: 1px solid #383838;
    border-radius: 25px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.settings-card h2 {
    font-size: 30px;
}

.settings-card label,
.export-options label,
.compare-selectors label {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 600;
    width: 100%;
}

.settings-card input[type="text"] {
    background: #141414;
    border: 1px solid #444;
    border-radius: 12px;
    color: var(--text);
    font: inherit;
    padding: 15px;
    width: 100%;
}

.settings-card select {
    width: 100%;
}

.settings-card .setting-check {
    flex-direction: row;
    align-items: center;
}

.setting-check input {
    width: 20px;
    height: 20px;
    accent-color: var(--purple);
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

#settings-status {
    color: var(--lime);
}

.theme-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
}

.theme-preview span {
    display: block;
    height: 65px;
    border-radius: 12px;
}


/* COMPARADOR */

.compare-selectors {
    display: flex;
    align-items: center;
    gap: 25px;
    background: var(--surface);
    border-radius: 25px;
    padding: 30px;
    margin: 30px 0;
}

.compare-selectors > strong {
    color: var(--purple);
    font-family: 'Outfit', sans-serif;
    font-size: 45px;
    font-weight: 900;
}

.compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.compare-year-card {
    border-radius: 25px;
    padding: 30px;
    color: #141414;
    overflow-wrap: anywhere;
}

.compare-year-card h2 {
    font-size: clamp(45px, 6vw, 90px);
}

.compare-year-card strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(30px, 5vw, 65px);
    line-height: 1;
    margin: 20px 0 5px;
}

.compare-metric {
    padding: 22px 0;
    border-bottom: 1px solid #383838;
}

.compare-metric:last-child {
    border-bottom: none;
}

.compare-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.compare-bar-row {
    display: grid;
    grid-template-columns: 55px 1fr auto;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.compare-bar {
    background: #333;
    border-radius: 30px;
    height: 15px;
    overflow: hidden;
}

.compare-bar-fill {
    height: 100%;
    border-radius: 30px;
    transition: width .4s ease;
}


/* RÉCORDS */

.records-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 35px;
}

.record-card {
    border-radius: 25px;
    padding: 30px;
    min-height: 240px;
    color: #141414;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.record-card span {
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: 700;
}

.record-card strong {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(30px, 4vw, 60px);
    font-weight: 900;
    line-height: 1;
    overflow-wrap: anywhere;
}

.record-card p {
    font-weight: 600;
}


/* EXPORTADOR */

#open-export {
    margin-top: 25px;
}

#export-dialog {
    background: #222;
    color: var(--text);
    border: 1px solid #444;
    border-radius: 25px;
    padding: 25px;
    width: min(950px, 95vw);
    max-height: 94dvh;
    margin: auto;
    overflow: auto;
}

#export-dialog::backdrop {
    background: #000c;
    backdrop-filter: blur(8px);
}

.export-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.export-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.export-preview {
    background: #141414;
    border-radius: 20px;
    margin: 25px 0;
    padding: 20px;
    display: grid;
    place-items: center;
}

#export-canvas {
    display: block;
    max-width: 100%;
    max-height: 52vh;
    width: auto;
    height: auto;
    border-radius: 8px;
}

#export-download {
    background: var(--lime);
    color: #141414;
}


/* RESPONSIVE */

@media (max-width: 800px) {

    .settings-grid,
    .records-grid {
        grid-template-columns: 1fr 1fr;
    }

    .export-options {
        grid-template-columns: 1fr;
    }

    .compare-selectors {
        gap: 12px;
        padding: 20px;
    }

    .compare-selectors > strong {
        font-size: 25px;
    }

}

@media (max-width: 550px) {

    .settings-grid,
    .records-grid {
        grid-template-columns: 1fr;
    }

    .compare-grid {
        gap: 10px;
    }

    .compare-year-card {
        padding: 18px;
    }

    .compare-metric-header {
        flex-wrap: wrap;
    }

    .compare-selectors {
        flex-direction: column;
    }

    .export-header {
        flex-wrap: wrap;
    }

}/* v0.6 */
.metadata-panel{margin-top:24px}.metadata-panel p{line-height:1.55}.metadata-panel .storage-actions{flex-wrap:wrap;margin:15px 0}.rank-cover{width:48px;height:48px;object-fit:cover;border-radius:8px}.clickable,.record-card[role=button]{cursor:pointer}.clickable:focus-visible,.record-card[role=button]:focus-visible{outline:2px solid var(--purple);outline-offset:4px}.session-card{padding:14px 0;border-bottom:1px solid #444}.session-card summary{cursor:pointer;font-weight:700;color:var(--purple)}.session-card p{padding:7px 12px;color:var(--text);font-size:14px}.filter-bar input[type=date]{background:var(--surface);color:var(--text);border:1px solid #444;border-radius:12px;padding:11px;font:inherit;color-scheme:dark}.compare-extra{margin-top:20px}.compare-extra p{margin:10px 0}.compare-table{width:100%;border-collapse:collapse}.compare-table th,.compare-table td{text-align:left;padding:9px;border-bottom:1px solid #444}.settings-card .storage-actions button{margin:4px 0}#detail-content h3{margin:18px 0 8px}#detail-content p{margin:8px 0}.record-card[role=button]:hover{outline:2px solid var(--purple)}
.manual-metadata{margin-top:20px}.manual-metadata summary{cursor:pointer;color:var(--purple)}.manual-metadata label{margin:12px 0}.manual-metadata select{max-width:100%}.manual-metadata input[type=search]{background:var(--surface);color:var(--text);border:1px solid #444;border-radius:12px;padding:12px;font:inherit;width:100%}

/* Private Access */
[hidden] {display:none!important}
.rewind-locked > :not(.cloud-gate):not(script) {display:none!important}
.cloud-gate {min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--background,#141414)}
.cloud-box {width:min(100%,460px);border:1px solid #444;border-radius:22px;padding:32px;background:#202020;color:#fff;box-shadow:0 12px 50px #0005}
.cloud-box h1 {font-size:clamp(32px,6vw,48px);line-height:1.04;margin:16px 0}
.cloud-box p {margin:16px 0;line-height:1.5}
.cloud-box form {display:grid;gap:14px}
.cloud-box label {display:grid;gap:7px}
.cloud-box input {width:100%;padding:12px;border:1px solid #666;background:#161616;color:#fff;border-radius:8px;font:inherit}
.cloud-panel {margin:20px 0}
