:root {
    --spotify-black: #121212;
    --spotify-green: #1DB954;
    --spotify-white: #FFFFFF;
    --spotify-gray: #B3B3B3;
    --wrapped-pink: #FF4D6D;
    --wrapped-purple: #6D28D9;
    --wrapped-orange: #FF8C00;
    --wrapped-yellow: #FFB700;
    --wrapped-blue: #00AEEF;
    --wrapped-bright-green: #00FF95;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--spotify-black);
    color: var(--spotify-white);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Animated Background Gradient */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: linear-gradient(125deg, #121212 0%, #1a1a1a 100%);
}

/* Improved Spotify Wrapped Background Blobs */
.bg-blob {
    position: fixed;
    width: 90vw;
    height: 90vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.35;
    pointer-events: none;
    animation: move 30s infinite alternate ease-in-out;
}

.blob-1 { background: var(--wrapped-blue); top: -15%; left: -15%; }
.blob-2 { background: var(--wrapped-purple); bottom: -15%; right: -15%; animation-delay: -8s; }
.blob-3 { background: var(--wrapped-bright-green); top: 35%; left: 5%; animation-delay: -15s; }

@keyframes move {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(15vw, 10vh) scale(1.3) rotate(90deg); }
    100% { transform: translate(-5vw, 20vh) scale(1.1) rotate(180deg); }
}

/* Stories Progress Bar */
.progress-container {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 3000;
}

.progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    flex-grow: 1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--spotify-white);
    width: 0%;
    transition: width 0.1s linear;
}

header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    position: relative;
}

h1 {
    font-weight: 900;
    font-size: clamp(2.8rem, 12vw, 5rem);
    text-transform: uppercase;
    letter-spacing: -4px;
    margin-bottom: 10px;
    color: var(--spotify-green);
    line-height: 0.85;
    text-shadow: 0 0 30px rgba(29, 185, 84, 0.3);
}

.subtitle {
    font-weight: 800;
    font-size: clamp(1rem, 4.5vw, 1.4rem);
    color: var(--wrapped-pink);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-top: 10px;
}

.heart-main {
    font-size: clamp(4rem, 18vw, 6.5rem);
    margin-top: 40px;
    animation: heartbeat 1.5s infinite;
    filter: drop-shadow(0 0 25px var(--wrapped-pink));
    cursor: pointer;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 20px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.card-container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}

.section-title {
    font-weight: 900;
    font-size: clamp(2.2rem, 10vw, 3.8rem);
    margin-bottom: 40px;
    text-transform: uppercase;
    line-height: 0.9;
    color: var(--spotify-white);
    text-align: center;
    letter-spacing: -2px;
}

/* Tiles Animation Style */
.tiles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(6, 1fr);
    pointer-events: none;
    z-index: 10;
}

.tile {
    background: var(--spotify-black);
    transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.4s ease;
}

.section-active .tile {
    transform: scale(0);
    opacity: 0;
}

/* Premium Spotify Card Design */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 35px;
    margin-bottom: 35px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: 0.5s;
}

.card:hover::before {
    left: 100%;
}

.card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 0 30px rgba(29, 185, 84, 0.2);
}

.photo-card {
    padding: 12px !important;
    border: 2px solid var(--spotify-green) !important;
    background: rgba(29, 185, 84, 0.1) !important;
}

.photo-img {
    border-radius: 16px;
    width: 100%;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

h2 {
    font-weight: 900;
    font-size: clamp(1.5rem, 7vw, 2rem);
    margin-bottom: 18px;
    text-transform: uppercase;
    color: var(--spotify-green);
    letter-spacing: -1px;
}

p {
    margin-bottom: 18px;
    font-size: clamp(0.95rem, 3.8vw, 1.05rem);
    font-weight: 500;
    color: var(--spotify-gray);
    line-height: 1.6;
}

.highlight {
    color: var(--spotify-white);
    font-weight: 800;
    background: var(--wrapped-purple);
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(109, 40, 217, 0.4);
}

.timeline-date {
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--spotify-green);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: block;
}

/* Swipe Horizontal Style */
.horizontal-swipe {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 25px;
    padding: 20px 15px 50px 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}

.horizontal-swipe::-webkit-scrollbar {
    display: none;
}

.horizontal-swipe .card {
    flex: 0 0 88vw;
    max-width: 420px;
    scroll-snap-align: center;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 420px;
}

@media (min-width: 500px) {
    .horizontal-swipe .card {
        flex: 0 0 420px;
    }
}

/* Pagination Dots */
.pagination-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dot.active {
    background: var(--spotify-green);
    transform: scale(1.4);
    box-shadow: 0 0 10px var(--spotify-green);
}

/* Stats Counter Style */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 25px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.06);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--spotify-green);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--spotify-gray);
    letter-spacing: 1.5px;
    font-weight: 700;
}

/* Celebration Button */
.btn-celebrate {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    background: var(--spotify-green);
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-celebrate:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--wrapped-bright-green);
}

#dynamic-greeting {
    margin-bottom: 15px;
    font-weight: 800;
    color: var(--spotify-gray);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    opacity: 0.8;
}

.verified-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(29, 185, 84, 0.2);
    color: var(--spotify-green);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border: 1px solid rgba(29, 185, 84, 0.3);
}

.verified-badge svg {
    color: var(--spotify-green);
}

/* Anniversary Badge */
.anniversary-badge {
    background: linear-gradient(90deg, var(--wrapped-pink), var(--wrapped-purple));
    color: white;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(255, 77, 109, 0.5);
}

/* Music Cards */
.music-card {
    background: #181818;
    padding: 0;
    overflow: hidden;
    border: none;
}

.spotify-embed-container {
    width: 100%;
    height: 152px;
    background: #282828;
    border: none;
    display: block;
}

.music-info {
    padding: 20px;
}

.lyrics-box {
    background: rgba(29, 185, 84, 0.1);
    padding: 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--wrapped-bright-green);
    font-weight: 800;
    line-height: 1.5;
    border-left: 5px solid var(--spotify-green);
}

/* Letter Style */
.letter-card {
    background: linear-gradient(135deg, var(--wrapped-pink), var(--wrapped-orange)) !important;
    color: var(--spotify-black) !important;
    padding: 40px 30px !important;
}

.letter-card h2, .letter-card p, .letter-card .letter-text {
    color: var(--spotify-black) !important;
}

.letter-text {
    white-space: pre-wrap;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.7;
    text-align: justify;
}

/* Love Stats Section */
.love-stats-container {
    margin-top: 30px;
}

.love-stat-row {
    margin-bottom: 20px;
}

.love-stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.love-stat-bar-bg {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.love-stat-bar-fill {
    height: 100%;
    background: var(--spotify-green);
    width: 0%;
    transition: width 1.5s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 10px;
}

.mood-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Footer Style */
.footer {
    text-align: center;
    padding: 120px 20px;
    font-weight: 900;
    font-size: clamp(1.4rem, 6vw, 2.5rem);
    text-transform: uppercase;
    color: var(--spotify-green);
    letter-spacing: -1px;
}

/* Anniversary Section Custom Styles */
.anniversary-card {
    background: linear-gradient(135deg, var(--spotify-green), var(--wrapped-purple)) !important;
}

.photo-caption-top { margin-top: 15px; }
.photo-caption-mid { margin-top: 19px; }
.photo-caption-bottom { margin-top: 10px; color: white; text-align: center; font-weight: 800; }
.photo-caption-small { margin-top: 10px; color: white; text-align: center; font-size: 0.8rem; opacity: 0.8; }

.promise-card {
    border: 2px solid var(--wrapped-pink) !important;
}

/* Stats Section Styles */
.stats-message {
    margin-top: 25px;
    text-align: center;
    font-weight: 800;
    color: var(--spotify-white);
}

.bar-pink { background: var(--wrapped-pink) !important; }
.bar-blue { background: var(--wrapped-blue) !important; }
.bar-green { background: var(--wrapped-bright-green) !important; }

/* Moments Section Styles */
.moment-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2rem;
}

/* Music Player Overlay */
.music-card {
    position: relative;
}

.music-player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 152px;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.music-card:hover .music-player-overlay {
    opacity: 0.2;
}

.play-btn {
    width: 50px;
    height: 50px;
    background: var(--spotify-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.music-card:hover .play-btn {
    transform: scale(1);
    opacity: 1;
}

/* Wrapped Summary Section */
.wrapped-summary-card {
    background: linear-gradient(135deg, #1DB954 0%, #000000 100%) !important;
    padding: 25px !important;
    border: none !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 550px;
    border-radius: 12px !important;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.summary-logo {
    font-weight: 900;
    font-size: 0.9rem;
    letter-spacing: -0.5px;
    color: white;
}

.summary-year {
    font-weight: 900;
    font-size: 1.2rem;
    color: #1DB954;
}

.summary-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-main-photo {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.summary-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-stat-box {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    color: rgba(255,255,255,0.6);
    letter-spacing: 1px;
}

.summary-value {
    font-size: 1.4rem;
    font-weight: 900;
    color: white;
}

.summary-footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-message {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    line-height: 1.4;
}

.spotify-logo-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1DB954;
    font-weight: 900;
    font-size: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--spotify-black);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--spotify-green);
}

/* Animations */
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 77, 109, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); }
}

/* Spotify Wave Animation */
.wave-container {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 35px;
    margin-top: 25px;
}

.wave-bar {
    width: 5px;
    height: 100%;
    background: var(--spotify-green);
    animation: wave 1.2s ease-in-out infinite;
    border-radius: 2px;
}

@keyframes wave {
    0%, 100% { height: 35%; }
    50% { height: 100%; }
}

/* Mobile specific adjustments */
@media (max-width: 480px) {
    section {
        padding: 60px 15px;
    }
    .card {
        padding: 25px;
    }
    .progress-container {
        top: 10px;
        left: 10px;
        right: 10px;
    }
    .wrapped-summary-card {
        min-height: 500px;
        padding: 20px !important;
    }
    .summary-value {
        font-size: 1.1rem;
    }
}

/* Custom moments grid style */
.moments-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.moment-item {
    aspect-ratio: 1/1;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.moment-item:hover {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.moment-vibe {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--spotify-green);
    color: black;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    z-index: 3;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.moment-item:hover .moment-vibe {
    opacity: 1;
    transform: translateY(0);
}

.moment-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.moment-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

.moment-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.moment-item:hover .moment-overlay {
    padding-bottom: 18px;
}
