:root {
    --primary: #800f2f;
    --secondary: #ad1457;
    --accent: #ff8da1;
    --bg: #fff5f7;
    --white: #ffffff;
    --text: #4a0e1c;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

h1, h2, h3, .main-title {
    font-family: 'Playfair Display', serif;
}

.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: drift 20s infinite alternate;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: -10%;
    left: -10%;
}

.circle-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -10%;
    right: -10%;
}

@keyframes drift {
    from { transform: translate(0, 0); }
    to { transform: translate(100px, 100px); }
}

/* Entrance Section */
.entrance {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(45deg, #fdfbfb 0%, #ebedee 100%);
}

.entrance-content {
    animation: float 3s ease-in-out infinite;
}

.main-title {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.ask-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
    font-style: italic;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px #fff, 0 0 10px var(--accent), 0 0 15px var(--accent); }
    to { text-shadow: 0 0 10px #fff, 0 0 20px var(--secondary), 0 0 30px var(--secondary); }
}

.subtitle {
    font-size: 1.4rem;

    font-style: italic;
    margin-bottom: 40px;
    color: var(--secondary);
}

.entrance-btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(128, 15, 47, 0.3);
    font-family: 'Poppins', sans-serif;
}

.entrance-btn:hover {
    transform: scale(1.1);
    background: var(--secondary);
    box-shadow: 0 15px 30px rgba(128, 15, 47, 0.5);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hidden {
    display: none !important;
}

/* Main Content */
#mainContent {
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header {
    text-align: center;
    font-size: 3rem;
    color: var(--primary);
    margin: 60px 0 40px;
}

.section-sub {
    text-align: center;
    font-style: italic;
    margin-bottom: 40px;
    color: var(--secondary);
}

/* Timeline Section */
.timeline-section {
    padding: 40px 20px;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; text-align: left; }

.timeline-content {
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 15px var(--shadow);
    border: 1px solid var(--accent);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: scale(1.05);
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.date {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--secondary);
    text-transform: uppercase;
}

/* Coupon Section */
.coupons-section {
    padding: 60px 20px;
    background: white;
}

.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.coupon {
    background: var(--bg);
    border: 2px dashed var(--primary);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.coupon:hover {
    transform: rotate(-2deg) scale(1.05);
    box-shadow: 0 10px 20px var(--shadow);
}

.coupon-inner {
    display: flex;
    align-items: center;
}

.coupon-left {
    background: var(--primary);
    color: white;
    font-size: 2rem;
    padding: 20px;
    text-align: center;
    border-radius: 0 50% 50% 0;
}

.coupon-right {
    padding: 20px;
    flex: 1;
}

.coupon-right h4 {
    color: var(--primary);
    margin-bottom: 5px;
}

/* Open When Section */
.open-when-section {
    padding: 60px 20px;
}

.open-when-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.letter-envelope {
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    border-bottom: 5px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 5px 15px var(--shadow);
}

.letter-envelope:hover {
    transform: translateY(-10px);
    background: var(--accent);
    color: white;
}

.letter-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-paper {
    background: #fffef0;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    line-height: 1.6;
    text-align: center;
}

#closeLetter {
    margin-top: 30px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 60px 0;
    background: white;
    color: var(--secondary);
    font-style: italic;
}

@media (max-width: 768px) {
    .main-title { font-size: 3rem; }
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; text-align: left !important; padding-left: 50px; }
    .timeline-item.right { left: 0; }
    .timeline-item.left { left: 0; }
    .timeline-item.left .timeline-content { text-align: left; }
}
