* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 50%, #ff69b4 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 105, 180, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 20, 147, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 1;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 60px 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: cardEnter 0.8s ease-out;
    border: 2px solid rgba(255, 105, 180, 0.3);
    backdrop-filter: blur(10px);
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.title {
    text-align: center;
    color: #ff1493;
    font-size: 3em;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.2);
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.heart-container {
    text-align: center;
    margin: 30px 0;
}

.heart {
    display: inline-block;
    width: 100px;
    height: 100px;
    position: relative;
    animation: heartBeat 1.2s ease-in-out infinite;
}

.heart::before,
.heart::after {
    content: "";
    position: absolute;
    width: 60px;
    height: 90px;
    background: #ff1493;
    border-radius: 60px 60px 0 0;
    top: 0;
}

.heart::before {
    left: 50px;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

.heart::after {
    right: 50px;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.2);
    }
    75% {
        transform: scale(1.1);
    }
}

.content {
    text-align: center;
    margin: 30px 0;
}

.message {
    font-size: 1.5em;
    color: #ff1493;
    margin-bottom: 20px;
    font-weight: bold;
}

.text {
    color: #333;
    line-height: 1.8;
    font-size: 1.1em;
    margin-bottom: 15px;
    animation: textFadeIn 1s ease-out 0.3s backwards;
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.closing {
    margin-top: 25px;
    color: #ff1493;
    font-size: 1.2em;
    font-style: italic;
}

.signature {
    color: #ff69b4;
    font-size: 1.3em;
    font-weight: bold;
    margin-top: 10px;
}

.countdown-section {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.countdown-item {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.1), rgba(255, 20, 147, 0.1));
    border: 2px solid rgba(255, 105, 180, 0.3);
    border-radius: 12px;
    padding: 10px 15px;
    min-width: 180px;
    text-align: center;
    animation: textFadeIn 1s ease-out 0.5s backwards;
}

.countdown-label {
    font-size: 0.75em;
    color: #ff1493;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-value {
    font-size: 0.85em;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
    white-space: pre-line;
}

.button {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    margin: 30px auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 20, 147, 0.4);
    font-weight: bold;
    display: block;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 20, 147, 0.6);
}

.button:active {
    transform: translateY(-1px);
}

.floating-hearts {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.heart-float {
    position: absolute;
    font-size: 2em;
    opacity: 0.7;
    animation: float 6s infinite;
}

.heart-float:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    font-size: 1.5em;
}

.heart-float:nth-child(2) {
    left: 20%;
    animation-delay: 1s;
    font-size: 2em;
}

.heart-float:nth-child(3) {
    left: 30%;
    animation-delay: 2s;
    font-size: 1.8em;
}

.heart-float:nth-child(4) {
    left: 40%;
    animation-delay: 0.5s;
    font-size: 2.2em;
}

.heart-float:nth-child(5) {
    left: 60%;
    animation-delay: 1.5s;
    font-size: 1.6em;
}

.heart-float:nth-child(6) {
    left: 75%;
    animation-delay: 2.5s;
    font-size: 2em;
}

.heart-float:nth-child(7) {
    left: 85%;
    animation-delay: 1.2s;
    font-size: 1.9em;
}

@keyframes float {
    0% {
        bottom: -50px;
        opacity: 0;
        transform: translateX(0) rotate(0deg);
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        bottom: 100vh;
        opacity: 0;
        transform: translateX(100px) rotate(360deg);
    }
}

.surprise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

.surprise.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.surprise-content {
    background: transparent;
    padding: 0;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

@keyframes surprisePopIn {
    from {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.surprise-text {
    color: white;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
    text-align: center;
    animation: surprisePopIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.surprise-image {
    max-width: 80vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 20px;
    object-fit: contain;
    animation: surprisePopIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s backwards;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #ff1493;
    font-size: 2em;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 110;
}

.close-btn:hover {
    background: white;
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .card {
        padding: 30px 20px;
    }
    
    .title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    
    .heart-container {
        margin: 15px 0;
    }
    
    .heart {
        width: 70px;
        height: 70px;
    }
    
    .heart::before,
    .heart::after {
        width: 50px;
        height: 75px;
        border-radius: 50px 50px 0 0;
    }
    
    .heart::before {
        left: 35px;
    }
    
    .heart::after {
        right: 35px;
    }
    
    .message {
        font-size: 1.2em;
        margin-bottom: 12px;
    }
    
    .text {
        font-size: 0.95em;
        line-height: 1.6;
        margin-bottom: 10px;
    }
    
    .closing {
        margin-top: 15px;
        font-size: 1em;
    }
    
    .signature {
        font-size: 1.1em;
        margin-top: 5px;
    }
    
    .button {
        margin: 20px auto 0;
        padding: 12px 30px;
        font-size: 1em;
    }
    
    .surprise-text {
        font-size: 1.3em;
    }
    
    .surprise-image {
        max-width: 90vw;
        max-height: 60vh;
    }
    
    .countdown-section {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    .countdown-item {
        min-width: auto;
        padding: 8px 12px;
    }
    
    .countdown-label {
        font-size: 0.7em;
        margin-bottom: 3px;
    }
    
    .countdown-value {
        font-size: 0.75em;
        line-height: 1.3;
    }
}

.compliments-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 50;
}

.compliment {
    position: fixed;
    font-size: 1.5em;
    font-weight: bold;
    pointer-events: none;
    animation: burstFromHeart 2.5s ease-out forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
}

@keyframes burstFromHeart {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--x-move)), calc(-50% + var(--y-move))) scale(1.2);
    }
}

#hearts-trail {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10;
}

.heart-trail {
    position: fixed;
    pointer-events: none;
    font-size: 1.5em;
    animation: trailFade 0.8s ease-out forwards;
}

@keyframes trailFade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

.sparkle {
    position: fixed;
    pointer-events: none;
    font-size: 1em;
    animation: sparkleAnim 0.6s ease-out forwards;
}

@keyframes sparkleAnim {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) translateY(-50px);
    }
}

.title.rainbow {
    background: linear-gradient(90deg, #ff69b4, #ff1493, #ff69b4, #ff1493);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowShift 2s linear;
}

@keyframes rainbowShift {
    0% {
        background-position: 0%;
    }
    100% {
        background-position: 100%;
    }
}

.timeline-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 5;
}

.timeline-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.timeline-item {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 18px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(255, 20, 147, 0.3);
    border: 2px solid rgba(255, 105, 180, 0.5);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.timeline-duplicate {
    display: none;
}

.timeline-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 20, 147, 0.5);
}

.timeline-date {
    font-size: 0.9em;
    font-weight: bold;
    color: #ff1493;
    margin-bottom: 4px;
}

.timeline-label {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

.timeline-item.show {
    animation: timelineFadeIn 0.6s ease-out forwards;
}

@keyframes timelineFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 600px) {
    .timeline-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        background: linear-gradient(to bottom, rgba(255, 105, 180, 0.9), transparent);
        padding: 15px 0;
        overflow: hidden;
        z-index: 60;
        bottom: auto;
    }
    
    .timeline-track {
        display: flex;
        flex-direction: row;
        gap: 15px;
        animation: scrollTimeline 30s linear infinite;
        width: max-content;
        padding-left: 15px;
    }
    
    .timeline-track:hover {
        animation-play-state: paused;
    }
    
    .timeline-duplicate {
        display: block;
    }
    
    @keyframes scrollTimeline {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
    
    .timeline-item {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        flex-shrink: 0;
        padding: 10px 15px;
        min-width: 160px;
        width: auto;
        opacity: 1 !important;
        transform: scale(1) !important;
        display: block;
    }
    
    .timeline-item.show {
        animation: none !important;
    }
    
    .timeline-date {
        font-size: 0.8em;
        margin-bottom: 3px;
        white-space: nowrap;
    }
    
    .timeline-label {
        font-size: 0.75em;
        white-space: nowrap;
    }
}
