* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --primary-color: #e91e63;
    --primary-light: #fce4ec;
    --secondary-color: #f06292;
    --text-color: #37474f;
    --text-light: #78909c;
    --background-color: #fff9fb;
    --card-color: #ffffff;
    --shadow: 0 10px 30px rgba(233, 30, 99, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2.5rem;
    background-color: var(--card-color);
    box-shadow: var(--shadow);
    border-radius: 12px;
    transition: var(--transition);
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--primary-light);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.timer {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    color: var(--text-light);
    transition: var(--transition);
}

.timer i {
    margin-right: 8px;
    color: var(--secondary-color);
}

.time-display {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
    margin-top: 0.8rem;
    transition: var(--transition);
    background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--secondary-color), transparent);
    transform: translateX(-50%);
    opacity: 0.7;
}

.milestone {
    position: relative;
    margin-bottom: 3.5rem;
    display: flex;
    flex-wrap: wrap;
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition);
}

.date {
    width: 30%;
    padding-right: 1.5rem;
    text-align: right;
    font-weight: 600;
    color: var(--text-light);
    font-size: 1.1rem;
    position: relative;
    padding-top: 0.5rem;
    transition: var(--transition);
}

.date:after {
    content: '';
    position: absolute;
    right: -10px;
    top: 10px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(240, 98, 146, 0.2);
    z-index: 1;
    transition: var(--transition);
}

.event {
    width: 60%;
    padding: 1.5rem 2rem;
    background-color: var(--card-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 3px solid var(--secondary-color);
    transition: var(--transition);
    transform: translateY(0);
}

.event:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.event h3 {
    color: var(--text-color);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.event h3 i {
    margin-right: 10px;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.event:hover h3 i {
    transform: scale(1.2);
}

.event p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1rem;
}

.days-ago {
    width: 10%;
    padding-left: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--primary-light);
}

footer p {
    font-size: 1.1rem;
    color: var(--text-light);
}

footer p i {
    color: var(--secondary-color);
    margin-left: 8px;
    animation: heartbeat 1.5s infinite ease-in-out;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.2); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
    60% { transform: scale(1); }
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        margin: 0.7rem;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .time-display {
        font-size: 1.4rem;
        padding: 0.5rem 0;
    }
    
    .timeline:before {
        left: 10px;
        transform: none;
        background: linear-gradient(to bottom, transparent, var(--secondary-color), var(--secondary-color), transparent);
        opacity: 0.5;
    }
    
    .date {
        width: 100%;
        text-align: left;
        padding-left: 2rem;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .date:after {
        left: 10px;
        right: auto;
        width: 12px;
        height: 12px;
        top: 8px;
    }
    
    .event {
        width: 100%;
        margin-left: 0;
        padding: 1.2rem;
        border-left: none;
        border-radius: 8px;
        border-top: 3px solid var(--secondary-color);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    .event h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .event p {
        font-size: 0.95rem;
    }
    
    .days-ago {
        width: auto;
        position: absolute;
        top: 10px;
        right: 10px;
        margin: 0;
        padding: 0;
        font-size: 0.8rem;
        color: var(--text-light);
        background-color: rgba(252, 228, 236, 0.3);
        padding: 3px 8px;
        border-radius: 12px;
    }
    
    .milestone {
        display: block;
        margin-bottom: 2.5rem;
        position: relative;
        padding-left: 28px;
    }
    
    .milestone:hover {
        transform: translateY(-3px);
    }
    
    .milestone .event:hover {
        transform: translateY(-2px);
    }
    
    .theme-toggle, .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
    }
    
    .back-to-top {
        bottom: 75px;
    }
    
    .love-message-content {
        width: 90%;
        max-width: 95%;
        padding: 30px 20px;
    }
    
    .love-message-content p {
        font-size: 18px;
    }
    
    .timeline-start, .timeline-end {
        padding-left: 28px;
        text-align: left;
    }
    
    .timeline-start i, .timeline-end i {
        display: inline-block;
        margin-right: 8px;
        margin-bottom: 0;
    }
    
    .dark-mode .days-ago {
        background-color: rgba(49, 53, 83, 0.3);
    }
    
    @keyframes mobileSlideIn {
        from { transform: translateX(-15px); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
    }
    
    .milestone {
        animation: mobileSlideIn 0.5s ease-out forwards;
        animation-fill-mode: both;
    }
    
    body::-webkit-scrollbar {
        width: 8px;
    }
    
    body::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
    }
    
    body::-webkit-scrollbar-thumb {
        background-color: var(--primary-light);
        border-radius: 4px;
    }
    
    .dark-mode body::-webkit-scrollbar-thumb {
        background-color: var(--primary-light);
    }
    
    .event {
        -webkit-tap-highlight-color: transparent;
    }
    
    .event:active {
        transform: scale(0.98);
    }
    
    .timeline:before {
        left: 0;
        transform: none;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 1.2rem 1rem;
        margin: 0.5rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .time-display {
        font-size: 1.2rem;
    }
    
    .event h3 {
        font-size: 1rem;
    }
    
    .event p {
        font-size: 0.9rem;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .container {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .timeline:before {
        left: 20px;
    }
    
    .date {
        padding-left: 3rem;
    }
    
    .date:after {
        left: 20px;
    }
    
    .milestone {
        padding-left: 38px;
    }
    
    .timeline-start, .timeline-end {
        padding-left: 38px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1100px;
    }
    
    body {
        font-size: 18px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .time-display {
        font-size: 2.2rem;
    }
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.milestone {
    animation: fadeIn 0.8s ease-out forwards;
    animation-fill-mode: both;
}

.milestone:nth-child(2) { animation-delay: 0.1s; }
.milestone:nth-child(3) { animation-delay: 0.2s; }
.milestone:nth-child(4) { animation-delay: 0.3s; }
.milestone:nth-child(5) { animation-delay: 0.4s; }
.milestone:nth-child(6) { animation-delay: 0.5s; }
.milestone:nth-child(7) { animation-delay: 0.6s; }
.milestone:nth-child(8) { animation-delay: 0.7s; }
.milestone:nth-child(9) { animation-delay: 0.8s; }

@keyframes slideIn {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

header h1 {
    animation: slideIn 0.8s ease-out forwards;
}

.timer {
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: both;
}

.timeline-start,
.timeline-end {
    text-align: center;
    margin: 30px 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.timeline-start i,
.timeline-end i {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
}

.timeline-start {
    margin-bottom: 40px;
}

.timeline-end {
    margin-top: 40px;
    opacity: 0.7;
}

.footer-note {
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.7;
    color: var(--text-light);
} 