:root {
    --bg-color: #0d0d0d;
    --accent-pink: #ff4d6d;
    --accent-pink-rgb: 255, 77, 109;
    --text-white: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-family: 'Montserrat', sans-serif;
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--accent-pink);
    z-index: 1000;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #1a1a1a 0%, #0d0d0d 100%);
}

.playfair {
    font-family: 'Playfair Display', serif;
}

.montserrat {
    font-family: 'Montserrat', sans-serif;
}

.v-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.v-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Card Base */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    width: 100%;
    max-width: 900px;
}

/* Hero & Counter */
#hero h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--accent-pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

#hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: 2px;
}

#countdown {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 15px;
    min-width: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.time-block:hover {
    transform: translateY(-5px);
    border-color: var(--accent-pink);
}

.time-block span {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent-pink);
}

.time-block label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    opacity: 0.6;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    animation: bounce 2s infinite;
    font-size: 1.5rem;
    color: var(--accent-pink);
    cursor: pointer;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* 3D Book Styles */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--accent-pink);
    margin: 0 auto;
}

.book-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.memory-card {
    perspective: 1500px;
    width: 100%;
    height: 500px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.memory-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

.card-front {
    background: #1a1a1a;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    text-align: left;
}

.card-back {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
}

.page h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-pink);
}

.page p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    max-width: 1000px;
    width: 100%;
    margin-top: 2rem;
}

.timeline-line {
    position: absolute;
    width: 2px;
    background: linear-gradient(transparent, var(--accent-pink), transparent);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.v-section.visible .timeline-item {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.left {
    left: 0;
    padding-right: 4rem;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    padding-left: 4rem;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--accent-pink);
    border-radius: 50%;
    top: 3.5rem;
    box-shadow: 0 0 15px var(--accent-pink);
    z-index: 5;
}

.left .timeline-dot {
    right: -7.5px;
}

.right .timeline-dot {
    left: -7.5px;
}

.timeline-content {
    padding: 2rem !important;
}

.timeline-content .date {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-pink);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-content h3 {
    margin-bottom: 0.8rem;
}

/* Staggered animation delay */
.timeline-item:nth-child(2) {
    transition-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    transition-delay: 0.4s;
}

.timeline-item:nth-child(4) {
    transition-delay: 0.6s;
}

.timeline-item:nth-child(5) {
    transition-delay: 0.8s;
}

.btn-flip {
    margin-top: 1.5rem;
    background: transparent;
    border: 1px solid var(--accent-pink);
    color: var(--accent-pink);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-flip:hover {
    background: var(--accent-pink);
    color: #fff;
}

/* Music Player */
.music-player {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.now-playing-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.album-art {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.track-details {
    display: flex;
    flex-direction: column;
}

.track-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.artist-name {
    font-size: 0.9rem;
    opacity: 0.6;
}

.player-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.player-controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}

.player-controls button:hover {
    color: var(--accent-pink);
}

.player-controls .main-btn {
    width: 50px;
    height: 50px;
    background: var(--accent-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    flex-grow: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}

.progress {
    height: 100%;
    background: var(--accent-pink);
    border-radius: 10px;
    width: 0%;
}

.playlist-container ul {
    list-style: none;
}

.playlist-container li {
    padding: 0.8rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.playlist-container li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-container li.active {
    color: var(--accent-pink);
    background: rgba(255, 77, 109, 0.1);
}

/* Scratch and Win */
.scratch-container {
    width: 100%;
    max-width: 400px;
}

.scratch-card {
    position: relative;
    width: 100%;
    height: 250px;
    background: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
}

.scratch-prize {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    z-index: 1;
}

#scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: crosshair;
}

.btn-download {
    margin-top: 1.5rem;
    background: var(--accent-pink);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    display: none;
    /* Initially hidden */
}

/* Responsive */
/* Star Map Interactiva */
.starmap-container {
    padding: 0 !important;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
}

.starmap-wrapper {
    position: relative;
    width: 100%;
    height: 450px;
    background: #000;
}

#star-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#star-canvas:active {
    cursor: grabbing;
}

.starmap-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.starmap-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: 0.3s;
}

.starmap-controls button:hover {
    background: var(--accent-pink);
    border-color: var(--accent-pink);
}

.starmap-info {
    padding: 2.5rem;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    position: absolute;
    bottom: 0;
    width: 100%;
    pointer-events: none;
}

.starmap-info .date-stars {
    font-size: 2.5rem;
    color: var(--accent-pink);
    display: block;
    margin: 0.5rem 0;
}

.starmap-info .hint {
    font-size: 0.8rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .starmap-wrapper {
        height: 350px;
    }

    .starmap-info .date-stars {
        font-size: 1.8rem;
    }

    .starmap-info {
        padding: 1.5rem;
    }
}

/* Reasons Generator */
.reasons-container {
    text-align: center;
    max-width: 600px !important;
}

#reason-display {
    font-size: 1.3rem;
    margin: 2rem 0;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    line-height: 1.6;
    transition: opacity 0.5s ease;
}

.heart-btn {
    background: transparent;
    border: 2px solid var(--accent-pink);
    color: var(--accent-pink);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 77, 109, 0.2);
    margin: 0 auto;
}

.heart-btn:hover {
    background: var(--accent-pink);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 77, 109, 0.5);
}

.heart-btn:active {
    transform: scale(0.9);
}

.reason-animation {
    animation: fadeInSlide 0.8s ease forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .v-section {
        padding: 2rem 1rem;
        min-height: auto;
        margin-bottom: 4rem;
    }

    #hero h1 {
        font-size: 2rem;
    }

    #hero .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .glass-card {
        padding: 1.2rem;
        border-radius: 16px;
    }

    #countdown {
        gap: 0.4rem;
    }

    .time-block {
        min-width: calc(33.33% - 0.4rem);
        padding: 0.6rem;
        margin-bottom: 0.4rem;
    }

    .time-block span {
        font-size: 1.1rem;
    }

    .time-block label {
        font-size: 0.55rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    /* Memory Cards Mobile */
    .memory-card {
        height: 420px;
    }

    .card-back {
        padding: 1.5rem;
    }

    .card-back h3 {
        font-size: 1.5rem;
    }

    .card-back p {
        font-size: 0.9rem;
    }

    .card-overlay h3 {
        font-size: 1.3rem;
    }

    /* Timeline Mobile */
    .timeline-line {
        left: 15px;
    }

    .timeline-item {
        width: 100% !important;
        left: 0 !important;
        padding-left: 35px !important;
        padding-right: 0 !important;
        text-align: left !important;
        margin-bottom: 1.2rem;
    }

    .timeline-dot {
        left: 7.5px !important;
        top: 2.2rem;
    }

    .timeline-content {
        padding: 1rem !important;
    }

    /* Music Mobile */
    .music-player {
        padding: 1rem;
    }

    .album-art {
        width: 50px;
        height: 50px;
    }

    .track-name {
        font-size: 0.95rem;
    }

    .player-controls .main-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .player-controls {
        gap: 0.8rem;
    }

    /* Scratch Mobile */
    .scratch-card {
        height: 180px;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 1.8rem;
    }

    .time-block {
        min-width: calc(50% - 0.5rem);
    }
}