/* ============================================================
   DigiBouquet - Styles (Image-based Top-Down Bouquet)
   ============================================================ */

:root {
    --bg: #fdf6f0;
    --bg-card: #ffffff;
    --text: #3a3a4a;
    --text-light: #7a7a8a;
    --primary: #e86ca0;
    --primary-light: #f5a0c8;
    --primary-dark: #c85080;
    --accent: #6bc5a0;
    --accent-dark: #4aa080;
    --shadow: rgba(120, 80, 100, 0.1);
    --shadow-md: rgba(120, 80, 100, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
}

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

body {
    font-family: 'Quicksand', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(232, 108, 160, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(107, 197, 160, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(155, 114, 207, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 60px;
    min-height: 100vh;
}

/* ---- Progress Bar ---- */
.progress-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253, 246, 240, 0.95);
    backdrop-filter: blur(10px);
    padding: 18px 10px 12px;
    margin: -20px -20px 30px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 10px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.4;
    transition: opacity 0.3s, transform 0.3s;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed .step-dot {
    background: var(--accent);
    border-color: var(--accent);
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    transition: all 0.3s;
}

.progress-step.active .step-dot {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.progress-step span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
}

.progress-step.active span {
    color: var(--primary);
}

.progress-line {
    height: 4px;
    background: #f0e0e8;
    border-radius: 2px;
    margin: 0 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
}

/* ---- Steps ---- */
.step {
    display: none;
    animation: fadeSlideIn 0.5s ease;
}

.step-active {
    display: block;
}

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

.step-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.4rem;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 6px;
}

.step-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* ---- Flower Grid ---- */
.flower-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.flower-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    border: 3px solid transparent;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    animation: popIn 0.4s ease backwards;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.flower-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-md);
}

.flower-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff5f8, #fff);
}

.flower-card .flower-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.flower-card.selected .flower-check {
    opacity: 1;
    transform: scale(1);
}

.flower-display {
    width: 90px;
    height: 90px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flower-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.3s ease;
}

.flower-card:hover .flower-preview-img {
    transform: scale(1.08) rotate(3deg);
}

.flower-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

/* ---- Greenery Grid ---- */
.greenery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.greenery-option {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    border: 3px solid transparent;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    animation: popIn 0.4s ease backwards;
}

.greenery-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-md);
}

.greenery-option.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, #f0faf5, #fff);
}

.greenery-display {
    width: 140px;
    height: 120px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.greenery-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.3s ease;
}

.greenery-option:hover .greenery-preview-img {
    transform: scale(1.06);
}

.greenery-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

/* ---- Navigation Buttons ---- */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
}

.btn {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 32px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-next {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(232, 108, 160, 0.3);
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 108, 160, 0.4);
}

.btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-back {
    background: white;
    color: var(--text-light);
    border: 2px solid #e8e0e8;
}

.btn-back:hover {
    background: #f8f0f5;
    border-color: var(--primary-light);
    color: var(--primary);
}

.btn-create {
    font-size: 1.1rem;
    padding: 14px 36px;
}

/* ============================================================
   CARD TEMPLATE SELECTION
   ============================================================ */
.card-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.card-template-option {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    border: 3px solid transparent;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
    animation: popIn 0.4s ease backwards;
}

.card-template-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-md);
}

.card-template-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff5f8, #fff);
}

.card-template-preview {
    width: 100%;
    min-height: 140px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.card-tmpl-effect {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.card-tmpl-effect[data-effect="torn"] {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 4px,
        rgba(160, 120, 80, 0.03) 4px,
        rgba(160, 120, 80, 0.03) 5px
    );
}

.card-tmpl-effect[data-effect="torn"]::before,
.card-tmpl-effect[data-effect="torn"]::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg,
        transparent 0%, rgba(160,120,80,0.15) 10%, transparent 20%,
        rgba(160,120,80,0.1) 30%, transparent 40%, rgba(160,120,80,0.12) 50%,
        transparent 60%, rgba(160,120,80,0.15) 70%, transparent 80%,
        rgba(160,120,80,0.1) 90%, transparent 100%);
}

.card-tmpl-effect[data-effect="torn"]::before { top: 0; }
.card-tmpl-effect[data-effect="torn"]::after { bottom: 0; }

.card-tmpl-effect[data-effect="burnt"] {
    box-shadow: inset 0 0 15px rgba(80, 40, 0, 0.15),
                inset 3px 3px 8px rgba(80, 40, 0, 0.1),
                inset -3px -3px 8px rgba(80, 40, 0, 0.1);
    border-radius: inherit;
}

.card-tmpl-effect[data-effect="burnt"]::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 0% 0%, rgba(100, 50, 0, 0.15) 0%, transparent 40%),
                radial-gradient(ellipse at 100% 100%, rgba(100, 50, 0, 0.12) 0%, transparent 35%),
                radial-gradient(ellipse at 100% 0%, rgba(80, 40, 0, 0.08) 0%, transparent 30%),
                radial-gradient(ellipse at 0% 100%, rgba(80, 40, 0, 0.1) 0%, transparent 30%);
}

.card-tmpl-effect[data-effect="shimmer"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 200, 150, 0.08) 45%,
        rgba(255, 200, 150, 0.15) 50%,
        rgba(255, 200, 150, 0.08) 55%,
        transparent 70%
    );
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-30%) translateY(-30%) rotate(45deg); }
    100% { transform: translateX(30%) translateY(30%) rotate(45deg); }
}

.card-tmpl-effect[data-effect="watercolor"]::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: inherit;
    background: radial-gradient(ellipse at 20% 30%, rgba(120, 140, 200, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 60%, rgba(160, 120, 200, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(100, 160, 200, 0.05) 0%, transparent 40%);
    filter: blur(3px);
}

.card-tmpl-effect[data-effect="stars"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1px 1px at 15% 20%, rgba(255,255,200,0.5) 50%, transparent 100%),
        radial-gradient(1px 1px at 45% 40%, rgba(255,255,200,0.4) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 70% 15%, rgba(255,255,200,0.6) 50%, transparent 100%),
        radial-gradient(1px 1px at 85% 55%, rgba(255,255,200,0.4) 50%, transparent 100%),
        radial-gradient(1px 1px at 30% 70%, rgba(255,255,200,0.3) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 60% 80%, rgba(255,255,200,0.5) 50%, transparent 100%);
}

.card-tmpl-effect[data-effect="botanical"]::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 0% 0%, rgba(100, 160, 100, 0.08) 0%, transparent 40%),
                radial-gradient(ellipse at 100% 100%, rgba(100, 160, 100, 0.06) 0%, transparent 35%);
}

.card-tmpl-effect[data-effect="kraft"] {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(100, 70, 40, 0.04) 3px,
        rgba(100, 70, 40, 0.04) 4px
    );
}

.card-tmpl-name {
    font-family: 'Dancing Script', cursive;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1;
    position: relative;
}

.card-tmpl-msg {
    font-size: 0.75rem;
    flex: 1;
    display: flex;
    align-items: center;
    opacity: 0.7;
    z-index: 1;
    position: relative;
}

.card-tmpl-from {
    font-family: 'Dancing Script', cursive;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: right;
    width: 100%;
    z-index: 1;
    position: relative;
}

.option-name {
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---- Card Form ---- */
.card-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.card-preview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-inner {
    width: 280px;
    min-height: 320px;
    background: linear-gradient(145deg, #fffaf5, #fff5f0);
    border-radius: var(--radius);
    padding: 30px 24px;
    box-shadow: 0 4px 20px var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.8);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(232, 108, 160, 0.15);
    overflow: hidden;
}

.rendered-card {
    animation: cardSlideUp 0.6s ease backwards;
    animation-delay: 0.3s;
}

.card-decoration {
    position: absolute;
    width: 16px;
    height: 16px;
    z-index: 0;
    pointer-events: none;
}

.card-decoration::before,
.card-decoration::after {
    content: '';
    position: absolute;
}

.card-decoration.top-left { top: 6px; left: 6px; }
.card-decoration.top-left::before {
    top: 0; left: 0;
    width: 16px; height: 2px;
    background: var(--accent, var(--primary-light));
    border-radius: 1px;
}
.card-decoration.top-left::after {
    top: 0; left: 0;
    width: 2px; height: 16px;
    background: var(--accent, var(--primary-light));
    border-radius: 1px;
}

.card-decoration.top-right { top: 6px; right: 6px; }
.card-decoration.top-right::before {
    top: 0; right: 0;
    width: 16px; height: 2px;
    background: var(--accent, var(--primary-light));
    border-radius: 1px;
}
.card-decoration.top-right::after {
    top: 0; right: 0;
    width: 2px; height: 16px;
    background: var(--accent, var(--primary-light));
    border-radius: 1px;
}

.card-decoration.bottom-left { bottom: 6px; left: 6px; }
.card-decoration.bottom-left::before {
    bottom: 0; left: 0;
    width: 16px; height: 2px;
    background: var(--accent, var(--primary-light));
    border-radius: 1px;
}
.card-decoration.bottom-left::after {
    bottom: 0; left: 0;
    width: 2px; height: 16px;
    background: var(--accent, var(--primary-light));
    border-radius: 1px;
}

.card-decoration.bottom-right { bottom: 6px; right: 6px; }
.card-decoration.bottom-right::before {
    bottom: 0; right: 0;
    width: 16px; height: 2px;
    background: var(--accent, var(--primary-light));
    border-radius: 1px;
}
.card-decoration.bottom-right::after {
    bottom: 0; right: 0;
    width: 2px; height: 16px;
    background: var(--accent, var(--primary-light));
    border-radius: 1px;
}

.card-to {
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.card-message {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
    flex: 1;
    word-break: break-word;
    padding: 10px 0;
    position: relative;
    z-index: 1;
}

.card-from {
    font-family: 'Dancing Script', cursive;
    font-size: 1.2rem;
    color: var(--primary-dark);
    text-align: right;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.card-inputs {
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
}

.input-group input,
.input-group textarea {
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    padding: 12px 16px;
    border: 2px solid #e8e0e8;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    transition: border-color 0.3s;
    outline: none;
    resize: none;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary);
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: right;
}

/* ---- Share Section ---- */
.share-section {
    text-align: center;
    padding: 20px 0;
}

.share-link-box {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto 15px;
}

.share-link-box input {
    flex: 1;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    padding: 12px 16px;
    border: 2px solid #e8e0e8;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    outline: none;
}

.btn-copy {
    background: var(--primary);
    color: white;
    padding: 12px 20px;
}

.btn-copy:hover {
    background: var(--primary-dark);
}

.copy-feedback {
    font-size: 0.85rem;
    color: var(--accent-dark);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
    margin-bottom: 20px;
}

.copy-feedback.visible {
    opacity: 1;
}

/* ============================================================
   BOUQUET SCENE - 3 clean layers:
   Layer 1 (z-0): Single selected greenery (bottom-center)
   Layer 2 (z-5): Detail overlay (bottom-center)
   Layer 3 (z-10): Flower cluster (on top, randomized sizes)
   ============================================================ */
.bouquet-scene {
    position: relative;
    width: 500px;
    min-height: 450px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 16px 0;
    overflow: hidden;
}

/* --- Layer 1: Greenery (single image, anchored to bottom-center) --- */
.bouquet-greenery-layer {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    z-index: 0;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.greenery-base-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0.95;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1));
}

/* --- Layer 3: Flower Cluster (on top, overlapping flexbox, randomized sizes) --- */
.bouquet-flower-cluster {
    position: relative;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 280px;
    margin: 0 auto;
    margin-bottom: 46px;
}

.bouquet-flower-item {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    padding-top: 8px;
    margin-left: -14px;
    margin-top: -45px;
}

.bouquet-flower-item:first-child {
    margin-left: 0;
}

.bouquet-flower-img {
    position: relative;
    z-index: 10;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.12));
    animation: flowerBloom 0.5s cubic-bezier(.2,.9,.3,1) backwards;
}

.bouquet-flower-img:hover {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.18));
}

/* Randomized flower sizes: small, medium, large (max 100px) */
.flower-size-small {
    width: 55px;
    height: 55px;
}

.flower-size-medium {
    width: 78px;
    height: 78px;
}

.flower-size-large {
    width: 100px;
    height: 100px;
}

@keyframes flowerBloom {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    to {
        opacity: 1;
    }
}

/* --- Layer 2: Detail Overlay (between greenery and flowers, anchored to bottom-center) --- */
.bouquet-detail-overlay {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.detail-overlay-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0.9;
}

/* ============================================================
   BOUQUET DISPLAY - Card tucked under the bouquet
   ============================================================ */
.ready-bouquet-scene {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.ready-bouquet-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ready-bouquet {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.ready-card {
    position: relative;
    margin-top: -10px;
    perspective: 600px;
    animation: cardPeekOut 0.9s cubic-bezier(.2,.9,.3,1) backwards;
    animation-delay: 0.4s;
}

.ready-card .card-inner {
    width: 200px;
    min-height: 190px;
    padding: 22px 18px 18px;
    transform: rotateX(4deg) rotate(-2deg);
    transform-origin: top center;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.04),
        0 6px 12px rgba(0,0,0,0.06),
        0 16px 32px rgba(0,0,0,0.08),
        0 30px 60px rgba(0,0,0,0.06);
    border-top: none;
    transition: transform 0.4s cubic-bezier(.2,.9,.3,1), box-shadow 0.4s ease;
}

.ready-card:hover .card-inner {
    transform: rotateX(0deg) rotate(-1deg) translateY(-6px);
    box-shadow:
        0 4px 8px rgba(0,0,0,0.04),
        0 12px 20px rgba(0,0,0,0.08),
        0 24px 48px rgba(0,0,0,0.1),
        0 40px 80px rgba(0,0,0,0.06),
        0 0 40px rgba(232, 108, 160, 0.08);
}

@keyframes cardPeekOut {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }
    60% {
        opacity: 1;
        transform: translateY(5px) scale(1.01);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ready-card .card-to,
.ready-card .card-from,
.reveal-card .card-to,
.reveal-card .card-from {
    font-size: 0.75rem;
}

.ready-card .card-message,
.reveal-card .card-message {
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ============================================================
   REVEAL PAGE
   ============================================================ */
#revealPage {
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 200;
    background: linear-gradient(160deg, #fdf6f0, #fce8f0, #f0e8fc, #e8f4f0);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.reveal-container {
    text-align: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
}

.reveal-header {
    margin-bottom: 20px;
    animation: fadeSlideIn 0.8s ease;
}

.reveal-title {
    font-size: 2.8rem;
    margin-bottom: 8px;
}

.reveal-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Bouquet Scene */
.reveal-bouquet-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(30px);
}

.reveal-bouquet-scene.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-bouquet-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reveal-bouquet {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.reveal-card {
    position: relative;
    margin-top: -10px;
    perspective: 600px;
    animation: cardPeekOut 0.9s cubic-bezier(.2,.9,.3,1) backwards;
    animation-delay: 0.6s;
}

.reveal-card .card-inner {
    width: 200px;
    min-height: 190px;
    padding: 22px 18px 18px;
    transform: rotateX(4deg) rotate(2deg);
    transform-origin: top center;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.04),
        0 6px 12px rgba(0,0,0,0.06),
        0 16px 32px rgba(0,0,0,0.08),
        0 30px 60px rgba(0,0,0,0.06);
    transition: transform 0.4s cubic-bezier(.2,.9,.3,1), box-shadow 0.4s ease;
}

.reveal-card:hover .card-inner {
    transform: rotateX(0deg) rotate(1deg) translateY(-6px);
    box-shadow:
        0 4px 8px rgba(0,0,0,0.04),
        0 12px 20px rgba(0,0,0,0.08),
        0 24px 48px rgba(0,0,0,0.1),
        0 40px 80px rgba(0,0,0,0.06),
        0 0 40px rgba(232, 108, 160, 0.08);
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) rotate(2deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(2deg);
    }
}

/* Card effect overlays */
.card-effect-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Torn Vintage - real torn paper edges */
.card-torn-effect {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.torn-edge {
    position: absolute;
    background: inherit;
    filter: drop-shadow(0 1px 2px rgba(100, 60, 20, 0.15));
}

.torn-edge-top {
    top: -6px;
    left: -2px;
    right: -2px;
    height: 12px;
    clip-path: polygon(
        0% 100%, 2% 55%, 4% 80%, 6% 40%, 8% 70%, 10% 30%,
        12% 65%, 14% 45%, 16% 75%, 18% 35%, 20% 60%, 22% 25%,
        24% 55%, 26% 40%, 28% 70%, 30% 20%, 32% 60%, 34% 45%,
        36% 80%, 38% 30%, 40% 55%, 42% 40%, 44% 70%, 46% 25%,
        48% 65%, 50% 35%, 52% 55%, 54% 45%, 56% 75%, 58% 30%,
        60% 60%, 62% 40%, 64% 70%, 66% 20%, 68% 55%, 70% 40%,
        72% 65%, 74% 30%, 76% 55%, 78% 45%, 80% 75%, 82% 35%,
        84% 60%, 86% 25%, 88% 50%, 90% 40%, 92% 70%, 94% 30%,
        96% 55%, 98% 45%, 100% 100%
    );
    background: linear-gradient(180deg, rgba(160, 120, 80, 0.12), rgba(160, 120, 80, 0.04));
}

.torn-edge-bottom {
    bottom: -6px;
    left: -2px;
    right: -2px;
    height: 12px;
    clip-path: polygon(
        0% 0%, 2% 50%, 4% 20%, 6% 60%, 8% 30%, 10% 70%,
        12% 35%, 14% 55%, 16% 25%, 18% 65%, 20% 40%, 22% 75%,
        24% 45%, 26% 60%, 28% 30%, 30% 80%, 32% 40%, 34% 55%,
        36% 20%, 38% 70%, 40% 45%, 42% 60%, 44% 30%, 46% 75%,
        48% 35%, 50% 65%, 52% 45%, 54% 55%, 56% 25%, 58% 70%,
        60% 40%, 62% 60%, 64% 30%, 66% 80%, 68% 45%, 70% 60%,
        72% 35%, 74% 70%, 76% 45%, 78% 55%, 80% 25%, 82% 65%,
        84% 40%, 86% 75%, 88% 50%, 90% 60%, 92% 30%, 94% 70%,
        96% 45%, 98% 55%, 100% 0%
    );
    background: linear-gradient(0deg, rgba(160, 120, 80, 0.12), rgba(160, 120, 80, 0.04));
}

.torn-edge-left {
    left: -5px;
    top: -2px;
    bottom: -2px;
    width: 10px;
    clip-path: polygon(
        100% 0%, 50% 2%, 75% 5%, 35% 8%, 60% 11%, 30% 14%,
        55% 17%, 40% 20%, 70% 23%, 25% 26%, 55% 29%, 40% 32%,
        65% 35%, 30% 38%, 50% 41%, 35% 44%, 60% 47%, 25% 50%,
        55% 53%, 40% 56%, 70% 59%, 30% 62%, 50% 65%, 35% 68%,
        65% 71%, 25% 74%, 55% 77%, 40% 80%, 60% 83%, 30% 86%,
        50% 89%, 40% 92%, 65% 95%, 35% 98%, 100% 100%
    );
    background: linear-gradient(90deg, rgba(160, 120, 80, 0.1), rgba(160, 120, 80, 0.02));
}

.torn-edge-right {
    right: -5px;
    top: -2px;
    bottom: -2px;
    width: 10px;
    clip-path: polygon(
        0% 0%, 50% 3%, 25% 6%, 65% 9%, 40% 12%, 70% 15%,
        45% 18%, 60% 21%, 30% 24%, 75% 27%, 45% 30%, 60% 33%,
        35% 36%, 70% 39%, 50% 42%, 65% 45%, 40% 48%, 75% 51%,
        45% 54%, 60% 57%, 30% 60%, 70% 63%, 50% 66%, 65% 69%,
        35% 72%, 75% 75%, 45% 78%, 60% 81%, 40% 84%, 70% 87%,
        50% 90%, 60% 93%, 35% 96%, 65% 99%, 0% 100%
    );
    background: linear-gradient(270deg, rgba(160, 120, 80, 0.1), rgba(160, 120, 80, 0.02));
}

/* The card itself gets a torn clip-path when using torn template */
.card-inner:has(.card-torn-effect) {
    border-radius: 0;
    clip-path: polygon(
        1% 1.5%, 3% 0.5%, 5% 1.8%, 7% 0.3%, 9% 1.2%, 11% 0.6%,
        13% 1.5%, 15% 0.4%, 17% 1.3%, 19% 0.8%, 21% 1.6%, 23% 0.2%,
        25% 1.4%, 27% 0.5%, 29% 1.7%, 31% 0.3%, 33% 1.1%, 35% 0.6%,
        37% 1.5%, 39% 0.4%, 41% 1.3%, 43% 0.7%, 45% 1.6%, 47% 0.2%,
        49% 1.4%, 51% 0.5%, 53% 1.8%, 55% 0.3%, 57% 1.2%, 59% 0.6%,
        61% 1.5%, 63% 0.4%, 65% 1.3%, 67% 0.8%, 69% 1.6%, 71% 0.2%,
        73% 1.4%, 75% 0.5%, 77% 1.7%, 79% 0.3%, 81% 1.1%, 83% 0.7%,
        85% 1.5%, 87% 0.4%, 89% 1.3%, 91% 0.6%, 93% 1.5%, 95% 0.3%,
        97% 1.2%, 99% 0.8%,
        99.5% 3%, 98.8% 6%, 99.3% 9%, 98.5% 12%, 99.2% 15%, 98.7% 18%,
        99.4% 21%, 98.6% 24%, 99.1% 27%, 98.8% 30%, 99.5% 33%, 98.4% 36%,
        99.2% 39%, 98.7% 42%, 99.3% 45%, 98.5% 48%, 99.1% 51%, 98.8% 54%,
        99.4% 57%, 98.6% 60%, 99.2% 63%, 98.5% 66%, 99.3% 69%, 98.7% 72%,
        99.1% 75%, 98.8% 78%, 99.5% 81%, 98.4% 84%, 99.2% 87%, 98.7% 90%,
        99.3% 93%, 98.5% 96%, 99% 99%,
        97% 99.2%, 95% 98.5%, 93% 99.5%, 91% 98.3%, 89% 99.1%, 87% 98.6%,
        85% 99.4%, 83% 98.5%, 81% 99.2%, 79% 98.7%, 77% 99.3%, 75% 98.4%,
        73% 99.5%, 71% 98.3%, 69% 99.1%, 67% 98.6%, 65% 99.4%, 63% 98.5%,
        61% 99.2%, 59% 98.7%, 57% 99.3%, 55% 98.4%, 53% 99.5%, 51% 98.3%,
        49% 99.1%, 47% 98.6%, 45% 99.4%, 43% 98.5%, 41% 99.2%, 39% 98.7%,
        37% 99.3%, 35% 98.4%, 33% 99.5%, 31% 98.3%, 29% 99.1%, 27% 98.6%,
        25% 99.4%, 23% 98.5%, 21% 99.2%, 19% 98.7%, 17% 99.3%, 15% 98.4%,
        13% 99.5%, 11% 98.3%, 9% 99.1%, 7% 98.6%, 5% 99.4%, 3% 98.5%, 1% 99%,
        0.5% 97%, 1.2% 94%, 0.7% 91%, 1.5% 88%, 0.8% 85%, 1.3% 82%,
        0.6% 79%, 1.4% 76%, 0.9% 73%, 1.2% 70%, 0.5% 67%, 1.6% 64%,
        0.8% 61%, 1.3% 58%, 0.7% 55%, 1.5% 52%, 0.9% 49%, 1.2% 46%,
        0.6% 43%, 1.4% 40%, 0.8% 37%, 1.5% 34%, 0.7% 31%, 1.3% 28%,
        0.9% 25%, 1.2% 22%, 0.5% 19%, 1.6% 16%, 0.8% 13%, 1.3% 10%,
        0.7% 7%, 1.5% 4%
    );
    box-shadow: 2px 3px 12px rgba(100, 70, 40, 0.18),
                -1px -1px 6px rgba(100, 70, 40, 0.08);
}

.card-burn-effect {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 30px rgba(80, 40, 0, 0.3),
                inset 6px 6px 15px rgba(80, 40, 0, 0.18),
                inset -6px -6px 15px rgba(80, 40, 0, 0.18);
    pointer-events: none;
    z-index: 0;
}

.card-burn-effect::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 0% 0%, rgba(60, 20, 0, 0.35) 0%, transparent 45%),
                radial-gradient(ellipse at 100% 100%, rgba(60, 20, 0, 0.3) 0%, transparent 40%),
                radial-gradient(ellipse at 100% 0%, rgba(80, 40, 0, 0.15) 0%, transparent 35%),
                radial-gradient(ellipse at 0% 100%, rgba(80, 40, 0, 0.2) 0%, transparent 35%);
}

.card-shimmer-effect {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.card-shimmer-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 25%,
        rgba(255, 220, 180, 0.08) 38%,
        rgba(255, 200, 150, 0.25) 48%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 200, 150, 0.25) 52%,
        rgba(255, 220, 180, 0.08) 62%,
        transparent 75%
    );
    animation: shimmer 3s ease-in-out infinite;
}

.card-watercolor-effect {
    position: absolute;
    inset: -10px;
    border-radius: inherit;
    background: radial-gradient(ellipse at 15% 25%, rgba(120, 140, 220, 0.18) 0%, transparent 50%),
                radial-gradient(ellipse at 85% 65%, rgba(180, 120, 220, 0.14) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 85%, rgba(100, 180, 220, 0.12) 0%, transparent 40%),
                radial-gradient(ellipse at 70% 20%, rgba(200, 140, 180, 0.08) 0%, transparent 35%);
    filter: blur(5px);
    pointer-events: none;
    z-index: 0;
}

.card-stars-effect {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(2px 2px at 15% 20%, rgba(255,255,200,0.8) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 45% 40%, rgba(255,255,200,0.6) 50%, transparent 100%),
        radial-gradient(2.5px 2.5px at 70% 15%, rgba(255,255,220,0.9) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 85% 55%, rgba(255,255,200,0.6) 50%, transparent 100%),
        radial-gradient(2px 2px at 30% 70%, rgba(255,255,200,0.5) 50%, transparent 100%),
        radial-gradient(2.5px 2.5px at 60% 80%, rgba(255,255,220,0.8) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 10% 85%, rgba(255,255,200,0.5) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 90% 30%, rgba(255,255,200,0.5) 50%, transparent 100%),
        radial-gradient(3px 3px at 50% 10%, rgba(255,255,220,0.7) 50%, transparent 100%),
        radial-gradient(1px 1px at 25% 50%, rgba(255,255,200,0.4) 50%, transparent 100%);
    animation: starsTwinkle 4s ease-in-out infinite alternate;
}

@keyframes starsTwinkle {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.card-botanical-effect {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 0% 0%, rgba(80, 160, 80, 0.15) 0%, transparent 45%),
                radial-gradient(ellipse at 100% 100%, rgba(80, 160, 80, 0.12) 0%, transparent 40%),
                radial-gradient(ellipse at 50% 50%, rgba(100, 180, 100, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Sparkles */
.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    animation: sparkle 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.sparkle:nth-child(odd) {
    background: var(--accent);
    width: 4px;
    height: 4px;
}

.sparkle:nth-child(3n) {
    background: #f4c542;
    width: 5px;
    height: 5px;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) translateY(0);
    }
    50% {
        opacity: 0.8;
        transform: scale(1) translateY(-20px);
    }
}

/* ============================================================
   STEP 5: THEME
   ============================================================ */

/* Background Template Grid */
.bg-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.bg-template-option {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border: 3px solid transparent;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
    animation: popIn 0.4s ease backwards;
    position: relative;
}

.bg-template-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-md);
}

.bg-template-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff5f8, #fff);
}

.bg-preview-swatch {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(0,0,0,0.08);
}

.bg-option-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.bg-animated-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(232, 108, 160, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
}

/* ============================================================
   BACKGROUND THEMES
   ============================================================ */

/* Applied to step6 (ready) or revealPage - full edge-to-edge viewport coverage */
#step6[class*="bg-"] {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 200;
    padding: 40px 20px;
    display: block;
    text-align: center;
}

#step6[class*="bg-"] > * {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.bg-soft-blush {
    background: linear-gradient(160deg, #fce4ec, #f8bbd0, #fce4ec) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 8s ease infinite !important;
}

.bg-midnight-garden {
    background: linear-gradient(160deg, #1a1a2e, #16213e, #0f3460, #1a1a2e) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 10s ease infinite !important;
}

.bg-midnight-garden .step-title,
.bg-midnight-garden .step-subtitle,
.bg-midnight-garden .reveal-title,
.bg-midnight-garden .reveal-subtitle {
    color: #e8d8f0;
}

.bg-midnight-garden .share-link-box input {
    background: rgba(255,255,255,0.1);
    color: #e8d8f0;
    border-color: rgba(255,255,255,0.2);
}

.bg-golden-hour {
    background: linear-gradient(160deg, #fff8e1, #ffe0b2, #ffcc80, #fff8e1) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 8s ease infinite !important;
}

.bg-lavender-dream {
    background: linear-gradient(160deg, #f3e5f5, #e1bee7, #ce93d8, #f3e5f5) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 8s ease infinite !important;
}

.bg-spring-meadow {
    background: linear-gradient(160deg, #e8f5e9, #c8e6c9, #a5d6a7, #e8f5e9) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 8s ease infinite !important;
}

.bg-starlit {
    background: linear-gradient(160deg, #0d1b2a, #1b2838, #1a237e, #0d1b2a) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 10s ease infinite !important;
}

.bg-starlit .step-title,
.bg-starlit .step-subtitle,
.bg-starlit .reveal-title,
.bg-starlit .reveal-subtitle {
    color: #c8d8f0;
}

.bg-starlit .share-link-box input {
    background: rgba(255,255,255,0.1);
    color: #c8d8f0;
    border-color: rgba(255,255,255,0.2);
}

/* ============================================================
   BACKGROUND PARTICLES
   ============================================================ */
.bg-particle {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

/* Midnight Garden - Fireflies */
.bg-particle.firefly {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(200, 255, 150, 0.7);
    box-shadow: 0 0 8px rgba(200, 255, 150, 0.5);
    animation: fireflyFloat 5s ease-in-out infinite alternate;
}

@keyframes fireflyFloat {
    0% { transform: translate(0, 0) scale(0.5); opacity: 0.3; }
    25% { opacity: 0.8; }
    50% { transform: translate(20px, -30px) scale(1); opacity: 1; }
    75% { opacity: 0.6; }
    100% { transform: translate(-15px, -10px) scale(0.7); opacity: 0.2; }
}

/* Golden Hour - Light Rays */
.bg-particle.light-ray {
    width: 2px;
    height: 120px;
    background: linear-gradient(180deg, rgba(255, 200, 100, 0.3), transparent);
    top: -20px;
    transform-origin: top center;
    animation: lightRaySway 8s ease-in-out infinite;
}

@keyframes lightRaySway {
    0%, 100% { transform: rotate(-8deg); opacity: 0.1; }
    50% { transform: rotate(8deg); opacity: 0.25; }
}

/* Spring Meadow - Petals */
.bg-particle.petal {
    width: 8px;
    height: 8px;
    border-radius: 50% 0 50% 0;
    background: rgba(244, 143, 177, 0.5);
    bottom: -10px;
    animation: petalDrift 8s ease-in-out infinite;
}

.bg-particle.petal:nth-child(even) {
    background: rgba(255, 255, 255, 0.4);
    width: 6px;
    height: 6px;
}

@keyframes petalDrift {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Starlit Night - Stars */
.bg-particle.star {
    border-radius: 50%;
    background: rgba(200, 220, 255, 0.9);
    box-shadow: 0 0 4px rgba(200, 220, 255, 0.6);
    animation: starTwinkle 2s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

/* Rose Mist - Glowing Orbs */
.bg-particle.rose-orb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 108, 160, 0.3), transparent);
    animation: roseOrbFloat 6s ease-in-out infinite alternate;
}

@keyframes roseOrbFloat {
    0% { transform: translate(0, 0) scale(0.6); opacity: 0.2; }
    50% { transform: translate(15px, -20px) scale(1.2); opacity: 0.5; }
    100% { transform: translate(-10px, 10px) scale(0.8); opacity: 0.15; }
}

/* Ocean Breeze - Bubbles */
.bg-particle.bubble {
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), rgba(128, 203, 196, 0.15));
    border: 1px solid rgba(255,255,255,0.2);
    bottom: -20px;
    animation: bubbleRise 6s ease-in-out infinite;
}

@keyframes bubbleRise {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    10% { opacity: 0.6; }
    80% { opacity: 0.4; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* Cherry Blossom - Falling Petals */
.bg-particle.blossom {
    width: 10px;
    height: 10px;
    border-radius: 50% 0 50% 0;
    background: rgba(240, 98, 146, 0.45);
    top: -15px;
    animation: blossomFall 8s ease-in-out infinite;
}

.bg-particle.blossom:nth-child(even) {
    background: rgba(248, 187, 208, 0.5);
    width: 7px;
    height: 7px;
    border-radius: 0 50% 0 50%;
}

.bg-particle.blossom:nth-child(3n) {
    background: rgba(255, 255, 255, 0.35);
    width: 6px;
    height: 6px;
}

@keyframes blossomFall {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.7; }
    50% { transform: translateY(50vh) translateX(30px) rotate(180deg); opacity: 0.6; }
    90% { opacity: 0.4; }
    100% { transform: translateY(100vh) translateX(-20px) rotate(360deg); opacity: 0; }
}

/* ============================================================
   NEW BACKGROUND THEMES (4 additional)
   ============================================================ */
.bg-rose-mist {
    background: linear-gradient(160deg, #f8e8f0, #e8b0c8, #d4789a, #f8e8f0) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 8s ease infinite !important;
}

.bg-ocean-breeze {
    background: linear-gradient(160deg, #e0f7fa, #80cbc4, #4db6ac, #e0f7fa) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 9s ease infinite !important;
}

.bg-sunset-glow {
    background: linear-gradient(160deg, #fff3e0, #ffab91, #ff8a65, #fff3e0) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 8s ease infinite !important;
}

.bg-cherry-blossom {
    background: linear-gradient(160deg, #fce4ec, #f48fb1, #f06292, #fce4ec) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 8s ease infinite !important;
}

/* ============================================================
   CARD EXPAND HINT
   ============================================================ */
.card-expand-hint {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 8px;
    opacity: 0.6;
    animation: hintPulse 3s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.ready-card .card-inner,
.reveal-card .card-inner {
    cursor: pointer;
}

/* ============================================================
   FULLSCREEN CARD OVERLAY
   ============================================================ */
.card-fullscreen-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
    cursor: pointer;
}

.card-fullscreen-overlay.active {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.card-fullscreen-overlay.closing {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
}

.card-fullscreen {
    width: 360px;
    min-height: 420px;
    padding: 40px 32px;
    border-radius: var(--radius);
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(.2,.9,.3,1), opacity 0.4s ease;
    cursor: default;
    box-shadow:
        0 8px 16px rgba(0,0,0,0.08),
        0 20px 40px rgba(0,0,0,0.12),
        0 40px 80px rgba(0,0,0,0.1);
}

.card-fullscreen-overlay.active .card-fullscreen {
    transform: scale(1);
    opacity: 1;
}

.card-fullscreen-overlay.closing .card-fullscreen {
    transform: scale(0.7);
    opacity: 0;
}

.card-fullscreen .card-to {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.card-fullscreen .card-message {
    font-size: 1.1rem;
    line-height: 1.8;
}

.card-fullscreen .card-from {
    font-size: 1.4rem;
    margin-top: 16px;
}

.card-fullscreen .card-decoration {
    width: 22px;
    height: 22px;
}

.card-fullscreen .card-decoration::before {
    width: 22px !important;
}

.card-fullscreen .card-decoration::after {
    height: 22px !important;
}

.card-fullscreen .card-decoration.top-left { top: 10px; left: 10px; }
.card-fullscreen .card-decoration.top-right { top: 10px; right: 10px; }
.card-fullscreen .card-decoration.bottom-left { bottom: 10px; left: 10px; }
.card-fullscreen .card-decoration.bottom-right { bottom: 10px; right: 10px; }

/* ---- Responsive ---- */
@media (max-width: 700px) {
    .flower-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .flower-display {
        width: 70px;
        height: 70px;
    }

    .card-form {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-inner {
        width: 100%;
        min-height: 250px;
    }

    .step-title {
        font-size: 1.8rem;
    }

    .card-template-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .progress-steps {
        padding: 0;
    }

    .progress-step span {
        font-size: 8px;
    }

    .step-dot {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .bouquet-scene {
        width: 340px;
        min-height: 340px;
    }

    .bouquet-flower-cluster {
        width: 210px;
        margin-bottom: 36px;
    }

    .flower-size-small {
        width: 42px;
        height: 42px;
    }

    .flower-size-medium {
        width: 58px;
        height: 58px;
    }

    .flower-size-large {
        width: 75px;
        height: 75px;
    }

    .bouquet-flower-item {
        margin-left: -10px;
        margin-top: -30px;
    }

    .greenery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reveal-bouquet {
        max-width: 380px;
    }

    .ready-bouquet {
        max-width: 380px;
    }

    .ready-card,
    .reveal-card {
        margin-top: -8px;
    }

    .ready-card .card-inner,
    .reveal-card .card-inner {
        width: 170px;
        min-height: 160px;
        padding: 16px 14px;
        transform: rotateX(2deg) rotate(-1deg);
    }

    .share-link-box {
        flex-direction: column;
    }

    .reveal-title {
        font-size: 2rem;
    }

    .bg-template-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .bg-preview-swatch {
        height: 60px;
    }

    .card-fullscreen {
        width: 300px;
        min-height: 360px;
        padding: 30px 24px;
    }

    .card-fullscreen .card-to {
        font-size: 1.3rem;
    }

    .card-fullscreen .card-message {
        font-size: 0.95rem;
    }

    .card-fullscreen .card-from {
        font-size: 1.1rem;
    }
}

@media (max-width: 420px) {
    .flower-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-template-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #app {
        padding: 12px;
    }

    .nav-buttons {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}
