:root {
    --cream: #FFF8F0;
    --rose: #E8A5A5;
    --terracotta: #C97064;
    --deep-rose: #8B5A5A;
    --gold: #D4A574;
    --shadow: rgba(139, 90, 90, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', serif;
    background: linear-gradient(135deg, var(--cream) 0%, #FFE8E0 100%);
    color: var(--deep-rose);
    overflow-x: hidden;
    position: relative;
}

/* Floating hearts background */
.hearts-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart-float {
    position: absolute;
    font-size: 20px;
    opacity: 0.15;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 1s ease-out;
}

h1 {
    font-family: 'Caveat', cursive;
    font-size: 4.5rem;
    color: var(--terracotta);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px var(--shadow);
    line-height: 1.2;
}

.subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: var(--deep-rose);
    opacity: 0.9;
}

/* Card styling */
.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px var(--shadow);
    border: 3px solid var(--rose);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out backwards;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(232, 165, 165, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.card-content {
    position: relative;
    z-index: 1;
}

h2 {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    color: var(--terracotta);
    margin-bottom: 20px;
    text-align: center;
}

/* Countdown Timer */
.countdown-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.countdown-box {
    background: linear-gradient(135deg, var(--rose) 0%, var(--terracotta) 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 20px var(--shadow);
}

.countdown-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Caveat', cursive;
}

.countdown-label {
    font-size: 1.2rem;
    opacity: 0.95;
}

.milestone {
    background: var(--cream);
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
    border-left: 4px solid var(--terracotta);
}

.milestone h3 {
    font-family: 'Caveat', cursive;
    color: var(--terracotta);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* Photo Gallery */
.photo-gallery {
    position: relative;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    margin: 30px 0;
}

.photo-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--cream);
}

.photo-slide.active {
    opacity: 1;
}

.photo-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--rose) 0%, var(--gold) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 15px;
}

.photo-caption {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    color: var(--deep-rose);
    text-align: center;
    padding: 0 20px;
}

.gallery-controls {
    text-align: center;
    margin-top: 20px;
}

.gallery-btn {
    background: var(--terracotta);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    margin: 0 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.gallery-btn:hover {
    background: var(--deep-rose);
    transform: translateY(-2px);
}

.gallery-dots {
    margin-top: 15px;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--rose);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--terracotta);
    transform: scale(1.3);
}

/* Music Player */
.music-player {
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--deep-rose) 100%);
    padding: 30px;
    border-radius: 15px;
    color: white;
    margin: 30px 0;
}

.player-header {
    text-align: center;
    margin-bottom: 25px;
}

.player-header h3 {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    margin-bottom: 5px;
}

.now-playing {
    font-style: italic;
    opacity: 0.9;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.player-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.playlist {
    margin-top: 25px;
}

.playlist-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
}

.playlist-item.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.song-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.song-memory {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--rose), var(--terracotta));
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    animation: slideIn 0.8s ease-out backwards;
}

.timeline-item:nth-child(odd) {
    padding-right: 55%;
}

.timeline-item:nth-child(even) {
    padding-left: 55%;
}

.timeline-content {
    background: var(--cream);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
    border: 2px solid var(--rose);
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 20px;
    width: 0;
    height: 0;
    border-left: 20px solid var(--cream);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.timeline-item:nth-child(even) .timeline-content::after {
    content: '';
    position: absolute;
    left: -20px;
    top: 20px;
    width: 0;
    height: 0;
    border-right: 20px solid var(--cream);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.timeline-date {
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    color: var(--terracotta);
    margin-bottom: 10px;
}

.timeline-emoji {
    font-size: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--rose);
    box-shadow: 0 4px 15px var(--shadow);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Treasure Hunt */
.treasure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.treasure-box {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--gold) 0%, var(--terracotta) 100%);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid var(--deep-rose);
    position: relative;
    overflow: hidden;
}

.treasure-box:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 25px var(--shadow);
}

.treasure-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.treasure-label {
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    color: white;
    text-align: center;
}

.treasure-box.unlocked {
    background: white;
    border-color: var(--rose);
}

.treasure-box.unlocked .treasure-icon {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Modal for treasure messages */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    margin: 20px;
    text-align: center;
    border: 4px solid var(--rose);
    animation: modalPop 0.4s ease;
}

@keyframes modalPop {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-emoji {
    font-size: 4rem;
    margin-bottom: 20px;
}

.modal-message {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: var(--deep-rose);
}

.modal-close {
    background: var(--terracotta);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: 'Caveat', cursive;
}

/* Video Message Section */
.video-container {
    background: var(--cream);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin: 30px 0;
}

.video-placeholder {
    width: 100%;
    max-width: 600px;
    height: 400px;
    background: linear-gradient(135deg, var(--rose) 0%, var(--terracotta) 100%);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 4px solid var(--deep-rose);
}

.video-placeholder:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px var(--shadow);
}

.video-icon {
    font-size: 5rem;
    color: white;
    margin-bottom: 20px;
}

.video-text {
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    color: white;
}

.video-instructions {
    background: rgba(232, 165, 165, 0.2);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 1rem;
    color: var(--deep-rose);
}

/* Quiz Section */
.quiz-question {
    margin-bottom: 30px;
}

.quiz-question h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--deep-rose);
}

.quiz-options {
    display: grid;
    gap: 10px;
}

.quiz-option {
    background: var(--cream);
    border: 2px solid var(--rose);
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.quiz-option:hover {
    background: var(--rose);
    color: white;
    transform: translateX(10px);
}

.quiz-option.selected {
    background: var(--terracotta);
    color: white;
    border-color: var(--deep-rose);
}

.quiz-option.correct {
    background: #90EE90;
    border-color: #228B22;
}

.quiz-option.incorrect {
    background: #FFB6C1;
    border-color: #DC143C;
}

button {
    background: var(--terracotta);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Caveat', cursive;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow);
    display: block;
    margin: 20px auto;
}

button:hover {
    background: var(--deep-rose);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}

.quiz-result {
    text-align: center;
    padding: 30px;
    background: var(--cream);
    border-radius: 15px;
    margin-top: 20px;
    display: none;
}

.quiz-result.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.score-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--deep-rose);
    margin: 20px 0;
}

/* Memory Game */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.memory-card {
    aspect-ratio: 1;
    background: var(--rose);
    border-radius: 15px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border: 3px solid var(--terracotta);
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.memory-card.matched {
    opacity: 0.6;
    pointer-events: none;
}

.memory-card-front,
.memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 12px;
}

.memory-card-back {
    background: white;
    transform: rotateY(180deg);
}

/* Love Coupons */
.coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.coupon {
    background: white;
    border: 3px dashed var(--rose);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coupon:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px var(--shadow);
}

.coupon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--deep-rose);
    transition: opacity 0.3s ease;
}

.coupon-overlay.scratched {
    opacity: 0;
    pointer-events: none;
}

.coupon-content strong {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    color: var(--terracotta);
    display: block;
    margin-bottom: 10px;
}

/* Love Letter */
.love-letter {
    background: var(--cream);
    padding: 40px;
    border-radius: 15px;
    border: 2px solid var(--gold);
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: center;
    font-style: italic;
    box-shadow: inset 0 0 20px rgba(139, 90, 90, 0.1);
}

.love-letter p {
    margin-bottom: 20px;
}

.signature {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: var(--terracotta);
    margin-top: 30px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }
.card:nth-child(5) { animation-delay: 0.4s; }
.card:nth-child(6) { animation-delay: 0.5s; }
.card:nth-child(7) { animation-delay: 0.6s; }
.card:nth-child(8) { animation-delay: 0.7s; }
.card:nth-child(9) { animation-delay: 0.8s; }

.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }
.timeline-item:nth-child(5) { animation-delay: 1s; }

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    .subtitle { font-size: 1.3rem; }
    .card { padding: 25px; }
    .memory-grid { grid-template-columns: repeat(3, 1fr); }
    .timeline::before { left: 30px; }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 80px;
        padding-right: 0;
    }
    .timeline-emoji {
        left: 30px;
    }
    .timeline-item:nth-child(odd) .timeline-content::after,
    .timeline-item:nth-child(even) .timeline-content::after {
        left: -20px;
        right: auto;
        border-right: 20px solid var(--cream);
        border-left: none;
    }
    .photo-placeholder { height: 300px; }
}