:root {
    --bg-color: #fdfbf7;
    --card-bg: #ffffff;
    --text-primary: #4a403a;
    --text-muted: #8c7a80;
    --accent-peach: #fdbb9d;
    --accent-peach-hover: #fa9c75;
    --accent-green: #e0edc5;
    --shadow-soft: 0 10px 30px rgba(253, 187, 157, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-family: 'Playfair Display', serif;
}

.font-serif { font-family: 'Playfair Display', serif; }
.italic { font-style: italic; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-peach { color: var(--accent-peach); }
.w-full { width: 100%; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.hidden { display: none !important; }

/* Aesthetic Background */
.aesthetic-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(253, 187, 157, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(224, 237, 197, 0.2) 0%, transparent 20%);
    z-index: -1;
}

#container {
    width: 100%;
    max-width: 450px;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Steps */
.step {
    position: absolute;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(10px);
}

.step.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 10;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px 30px;
    width: 100%;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shadow-soft { box-shadow: var(--shadow-soft); }

.hero-image {
    width: 120px; height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.float-anim { animation: float 3s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Buttons */
.btn-floral {
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    background: var(--accent-peach);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 4px 15px rgba(253, 187, 157, 0.4);
}

.btn-floral:hover {
    background: var(--accent-peach-hover);
    transform: translateY(-2px);
}

.btn-outline-floral {
    padding: 10px 25px;
    border-radius: 30px;
    border: 1px solid var(--accent-peach);
    background: transparent;
    color: var(--accent-peach);
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline-floral:hover {
    background: var(--accent-peach);
    color: white;
}

/* Puzzle */
.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(3, 60px);
    grid-gap: 10px;
    margin: 0 auto;
}

.puzzle-cell {
    width: 60px; height: 60px;
    border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    font-size: 2rem; color: var(--accent-peach);
    background: #fcf4f0;
    transition: all 0.3s ease;
}

.puzzle-cell.empty {
    background: #f0f0f0;
    color: transparent;
    cursor: pointer;
    border: 2px dashed #ddd;
}
.puzzle-cell.empty:hover { background: #e8e8e8; }
.puzzle-cell.filled { border: 2px solid transparent; }

/* Interactive Petals */
.petals-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.petal-wrapper {
    position: relative;
    width: 100%; height: 80px;
}

.petal-front {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: white; border-radius: 40px;
    display: flex; align-items: center;
    padding: 0 20px;
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 2;
    border: 1px solid #fcf4f0;
}

.petal-front img { width: 40px; height: 40px; object-fit: contain; margin-right: 15px; }
.prompt-text { font-size: 1.2rem; color: var(--text-primary); }

.petal-front.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.petal-back {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fffafa; border-radius: 40px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 20px;
    text-align: center;
    font-style: italic; color: var(--text-muted);
    border: 1px dashed var(--accent-peach);
    z-index: 1;
    opacity: 1; transition: opacity 0.5s ease;
}

.petal-back.hidden { opacity: 0; pointer-events: none; }

/* Final Letter */
.letter-card {
    background: #fffcf9;
    border-radius: 4px;
    padding: 40px 30px;
    width: 100%;
    box-shadow: var(--shadow-soft);
    position: relative;
}

.letter-header {
    display: flex; justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.letter-body {
    line-height: 1.8;
    font-size: 1.1rem;
}

.letter-footer {
    display: flex; justify-content: center;
    margin-top: 30px;
}
