.wrapped-root {
    position: fixed;
    inset: 0;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
    background: #000;
}
.wrapped-root.show { opacity: 1; visibility: visible; }

.wrapped-loading,
.wrapped-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: #fff;
    text-align: center;
    padding: 40px;
}
.wrapped-empty i { font-size: 60px; opacity: .2; }
.wrapped-empty h2 { font-size: 24px; font-weight: 800; }
.wrapped-empty p  { color: #b3b3b3; font-size: 14px; }
.wrapped-close-btn {
    margin-top: 10px;
    padding: 12px 28px;
    border-radius: 500px;
    background: #fff;
    color: #000;
    border: none;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.wrapped-stage {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #fff;
    transition: background 1.2s ease;
}

.wrapped-stage[data-theme="intro"]        { background: linear-gradient(160deg, #1a0a2e, #4a148c 55%, #7c3aed); }
.wrapped-stage[data-theme="time"]         { background: linear-gradient(160deg, #0d1b3e, #1e3a8a 55%, #3b82f6); }
.wrapped-stage[data-theme="artist"]       { background: linear-gradient(160deg, #4a044e, #a21caf 55%, #ec4899); }
.wrapped-stage[data-theme="top5-artists"] { background: linear-gradient(160deg, #1a0a2e, #7c3aed 55%, #ec4899); }
.wrapped-stage[data-theme="track"]        { background: linear-gradient(160deg, #052e16, #15803d 55%, #22c55e); }
.wrapped-stage[data-theme="top5-tracks"]  { background: linear-gradient(160deg, #052e16, #15803d 55%, #4ade80); }
.wrapped-stage[data-theme="album"]        { background: linear-gradient(160deg, #451a03, #d97706 55%, #fbbf24); }
.wrapped-stage[data-theme="month"]        { background: linear-gradient(160deg, #0c0a09, #52525b 55%, #a1a1aa); }
.wrapped-stage[data-theme="numbers"]      { background: linear-gradient(160deg, #1e1b4b, #4338ca 55%, #818cf8); }
.wrapped-stage[data-theme="final"]        { background: linear-gradient(160deg, #450a0a, #be185d 55%, #ec4899); }

.wrapped-stage::before {
    content: '';
    position: absolute;
    top: -180px; right: -180px;
    width: 520px; height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
    pointer-events: none;
    animation: wrappedFloat 14s ease-in-out infinite;
    z-index: 1;
}
.wrapped-stage::after {
    content: '';
    position: absolute;
    bottom: -220px; left: -220px;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,0,0,.35), transparent 70%);
    pointer-events: none;
    z-index: 1;
}
@keyframes wrappedFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    50%     { transform: translate(-40px, 30px) scale(1.15); }
}

.wrapped-progress {
    position: absolute;
    top: 20px; left: 20px; right: 20px;
    display: flex;
    gap: 6px;
    z-index: 20;
}
.wrapped-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,.2);
    overflow: hidden;
    transition: background .3s;
}
.wrapped-bar.active { background: rgba(255,255,255,.95); }
.wrapped-bar.done   { background: rgba(255,255,255,.65); }

.wrapped-close {
    position: absolute;
    top: 40px; right: 20px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all .2s;
}
.wrapped-close:hover { background: rgba(0,0,0,.6); transform: scale(1.05); }

.wrapped-nav {
    position: absolute;
    bottom: 24px; left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 14px;
    z-index: 20;
}
.wrapped-nav button {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    backdrop-filter: blur(10px);
}
.wrapped-nav button:hover:not(:disabled) { background: rgba(255,255,255,.2); }
.wrapped-nav button:disabled { opacity: .3; cursor: default; }

.wrapped-slide {
    flex: 1;
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 30px;
    overflow-y: auto;
    animation: wrappedSlideIn .6s cubic-bezier(.16,1,.3,1);
}
@keyframes wrappedSlideIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wrapped-hero {
    max-width: 620px;
    text-align: center;
    position: relative;
    z-index: 5;
}

.wrapped-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 500px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
}

.wrapped-kicker {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,.75);
    margin-bottom: 22px;
}

.wrapped-big {
    font-size: 76px;
    font-weight: 900;
    letter-spacing: -3px;
    line-height: .95;
    margin-bottom: 8px;
    text-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.wrapped-big2 {
    font-size: 76px;
    font-weight: 900;
    letter-spacing: -3px;
    line-height: .95;
    background: linear-gradient(135deg, #fff, #f5d5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wrapped-huge {
    font-size: 160px;
    font-weight: 900;
    line-height: .9;
    letter-spacing: -8px;
    margin: 10px 0;
    background: linear-gradient(135deg, #fff, #a5f3fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 8px 40px rgba(0,0,0,.35));
}
.wrapped-huge span {
    font-size: 60px;
    letter-spacing: -2px;
    margin-left: 8px;
}
.wrapped-huge2 {
    font-size: 96px;
    font-weight: 900;
    letter-spacing: -3px;
    line-height: 1;
    background: linear-gradient(135deg, #fff, #d4d4d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wrapped-name {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    margin-top: 20px;
    text-shadow: 0 8px 40px rgba(0,0,0,.4);
    word-break: break-word;
}
.wrapped-sub {
    font-size: 17px;
    color: rgba(255,255,255,.85);
    margin-top: 12px;
    font-weight: 500;
}
.wrapped-mini {
    font-size: 13px;
    color: rgba(255,255,255,.65);
    margin-top: 16px;
    letter-spacing: .3px;
}

.wrapped-artist-img {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
    margin: 20px auto;
    display: block;
    box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 6px rgba(255,255,255,.08);
    animation: wrappedPulse 4s ease-in-out infinite;
}
.wrapped-cover {
    width: 300px;
    height: 300px;
    border-radius: 16px;
    object-fit: cover;
    margin: 20px auto;
    display: block;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
    animation: wrappedPulse 4s ease-in-out infinite;
}
@keyframes wrappedPulse {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.03); }
}

.wrapped-tap-hint {
    margin-top: 40px;
    font-size: 13px;
    color: rgba(255,255,255,.6);
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: wrappedBlink 2s ease-in-out infinite;
}
@keyframes wrappedBlink {
    0%,100% { opacity: .4; }
    50%     { opacity: 1; }
}

.wrapped-top5 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}
.wrapped-top5-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    backdrop-filter: blur(14px);
    animation: wrappedSlideIn .5s cubic-bezier(.16,1,.3,1) backwards;
}
.wrapped-top5-item:nth-child(1) { animation-delay: .05s; }
.wrapped-top5-item:nth-child(2) { animation-delay: .1s; }
.wrapped-top5-item:nth-child(3) { animation-delay: .15s; }
.wrapped-top5-item:nth-child(4) { animation-delay: .2s; }
.wrapped-top5-item:nth-child(5) { animation-delay: .25s; }
.wrapped-top5-item img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.wrapped-top5-rank {
    font-size: 22px;
    font-weight: 900;
    width: 24px;
    text-align: center;
    color: rgba(255,255,255,.55);
}
.wrapped-top5-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.wrapped-top5-info strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wrapped-top5-info span {
    font-size: 12.5px;
    color: rgba(255,255,255,.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-top: 2px;
}

.wrapped-numbers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 460px;
    margin: 30px auto 0;
}
.wrapped-number-card {
    padding: 22px 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    backdrop-filter: blur(14px);
    text-align: center;
}
.wrapped-num-big {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 8px;
}
.wrapped-num-label {
    font-size: 11.5px;
    color: rgba(255,255,255,.7);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.wrapped-cta {
    padding: 14px 30px;
    border-radius: 500px;
    background: #fff;
    color: #000;
    border: none;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all .25s cubic-bezier(.16,1,.3,1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.wrapped-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,255,255,.2); }
.wrapped-cta.secondary {
    background: rgba(255,255,255,.14);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
}
.wrapped-final-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
    box-shadow: 0 20px 60px rgba(236,72,153,.5);
    animation: wrappedPulse 3s ease-in-out infinite;
}

.wrapped-video-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    transition: opacity .8s ease;
    mix-blend-mode: luminosity;
}

.wrapped-video-bg iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200vw;
    height: 200vh;
    min-width: 120vw;
    min-height: 120vh;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
}

.wrapped-hero-over-video {
    position: relative;
    z-index: 5;
}

@media (max-width: 700px) {
    .wrapped-big, .wrapped-big2 { font-size: 52px; letter-spacing: -2px; }
    .wrapped-huge { font-size: 110px; letter-spacing: -5px; }
    .wrapped-huge span { font-size: 42px; }
    .wrapped-huge2 { font-size: 64px; }
    .wrapped-name { font-size: 38px; letter-spacing: -1.5px; }
    .wrapped-artist-img { width: 200px; height: 200px; }
    .wrapped-cover { width: 230px; height: 230px; }
    .wrapped-slide { padding: 70px 20px; }
    .wrapped-top5-item { padding: 10px 12px; gap: 12px; }
    .wrapped-top5-item img { width: 44px; height: 44px; }
    .wrapped-numbers-grid { grid-template-columns: 1fr 1fr; }
    .wrapped-num-big { font-size: 26px; }
}