@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Poppins:wght@300;400;600&display=swap');

:root {
    --primary-color: #c6b4d9;
    --secondary-color: #d9cceb;
    --accent-color: #9b7cb6;
    --text-color: #2c2c2c;
    --light-bg: #f5f0ff;
    --card-bg: #ffffff;
    --heart-color: #c6b4d9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1.5s ease-in-out;
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 300;
}

/* Heart styling */
.heart-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.heart {
    width: 100px;
    height: 100px;
    background-color: var(--heart-color);
    position: relative;
    transform: rotate(45deg);
    animation: pulse 1.5s infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.heart:before,
.heart:after {
    content: "";
    width: 100px;
    height: 100px;
    background-color: var(--heart-color);
    border-radius: 50%;
    position: absolute;
}

.heart:before {
    top: -50px;
    left: 0;
}

.heart:after {
    top: 0;
    left: -50px;
}

.heart:hover {
    transform: rotate(45deg) scale(1.1);
}

.heart.active {
    animation: heartBeat 0.5s ease-in-out;
}

/* Message section */
.message-section {
    margin: 4rem 0;
    animation: fadeIn 2s ease-in-out;
}

.message {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.message::before {
    content: "\201C";
    font-family: 'Dancing Script', cursive;
    font-size: 5rem;
    color: var(--secondary-color);
    opacity: 0.3;
    position: absolute;
    top: -15px;
    left: 10px;
}

.message p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.name {
    font-family: 'Dancing Script', cursive;
    color: var(--accent-color);
    font-size: 1.4rem;
    font-weight: bold;
}

.signature {
    font-family: 'Dancing Script', cursive;
    text-align: right;
    font-size: 1.5rem;
    margin-top: 2rem;
}

/* Memory Gallery */
.memory-gallery {
    margin: 4rem 0;
}

.memory-gallery h2 {
    text-align: center;
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.gallery {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.memory-card {
    width: 250px;
    height: 250px;
    perspective: 1000px;
}

.memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.memory-card:hover .memory-card-inner {
    transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.memory-card-front {
    background-color: var(--secondary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.memory-card-front i {
    font-size: 5rem;
    color: white;
}

.memory-card-back {
    background-color: var(--card-bg);
    color: var(--text-color);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
}

.memory-card-back p:first-child {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.memory-text {
    font-size: 1rem;
    line-height: 1.5;
}

/* Reasons section */
.reasons {
    margin: 4rem 0;
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.reasons h2 {
    text-align: center;
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

#reasons-list {
    list-style-position: inside;
    margin-bottom: 1rem;
}

#reasons-list li {
    padding: 0.7rem 0;
    border-bottom: 1px dashed var(--secondary-color);
    font-size: 1.1rem;
}

#reasons-list li:last-child {
    border-bottom: none;
}

/* Love counter */
.love-counter {
    margin: 4rem 0;
    text-align: center;
}

.love-counter h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.counter {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.time-unit {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    min-width: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.time-unit span:first-child {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.label {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

.counter-caption {
    font-style: italic;
    color: var(--primary-color);
    margin-top: 1rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--secondary-color);
    opacity: 0.8;
}

footer p {
    margin-bottom: 0.5rem;
}

footer i {
    color: var(--heart-color);
}

.date {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: rotate(45deg) scale(1);
    }

    50% {
        transform: rotate(45deg) scale(1.1);
    }

    100% {
        transform: rotate(45deg) scale(1);
    }
}

@keyframes heartBeat {
    0% {
        transform: rotate(45deg) scale(1);
    }

    25% {
        transform: rotate(45deg) scale(1.3);
    }

    50% {
        transform: rotate(45deg) scale(1);
    }

    75% {
        transform: rotate(45deg) scale(1.3);
    }

    100% {
        transform: rotate(45deg) scale(1);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .title {
        font-size: 2.8rem;
    }

    .gallery {
        gap: 1rem;
    }

    .memory-card {
        width: 220px;
        height: 220px;
    }

    .counter {
        flex-wrap: wrap;
    }

    .time-unit {
        min-width: 80px;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.3rem;
    }

    .memory-card {
        width: 100%;
        max-width: 300px;
    }
}