/* ==========================================================================
   LILY FLOWER & BOUQUET SIMULATION - DESIGN SYSTEM & STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
    --bg-dark: #090c10;
    --bg-card: rgba(18, 24, 38, 0.75);
    --bg-card-hover: rgba(28, 36, 56, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(147, 51, 234, 0.5);

    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --accent-pink: #ff4b82;
    --accent-purple: #a855f7;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-blue: #3b82f6;

    --glow-pink: rgba(255, 75, 130, 0.35);
    --glow-purple: rgba(168, 85, 247, 0.35);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'Fira Code', monospace;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Background Ambient Glows */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    animation: blobFloat 18s infinite alternate ease-in-out;
}

.ambient-blob-1 {
    top: -10%;
    left: 20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-pink), transparent);
}

.ambient-blob-2 {
    bottom: -10%;
    right: 15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-purple), transparent);
    animation-delay: -9s;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, 50px) scale(1.1);
    }
}

/* Layout Header */
header {
    position: relative;
    z-index: 10;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: rgba(9, 12, 16, 0.7);
    backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--glow-pink);
    font-size: 1.25rem;
}

.brand h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 30%, #d1d5db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(168, 85, 247, 0.3);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-header {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-header:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-header.primary {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border: none;
    box-shadow: 0 4px 15px var(--glow-purple);
}

.btn-header.primary:hover {
    box-shadow: 0 6px 20px var(--glow-pink);
    transform: translateY(-2px);
}

/* App Main Layout - Fullscreen Canvas Viewport */
.app-container {
    position: relative;
    z-index: 5;
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    max-width: 100vw;
    display: block;
    overflow: hidden;
}

/* Canvas Viewport Fullscreen */
.viewport-panel {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: none;
}

.canvas-container {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    cursor: grab;
}

.canvas-container:active {
    cursor: grabbing;
}

#simulationCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Floating Overlay Tips on Canvas */
.canvas-overlay-tip {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(9, 12, 16, 0.75);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    pointer-events: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

/* Control Sidebar Panel */
.controls-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.controls-panel::-webkit-scrollbar {
    width: 6px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.section-title svg {
    width: 16px;
    height: 16px;
    color: var(--accent-pink);
}

/* Preset Cards */
.presets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-main);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.preset-btn.active {
    background: rgba(255, 75, 130, 0.12);
    border-color: var(--accent-pink);
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 75, 130, 0.2);
}

.preset-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Control Groups & Sliders */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.control-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.control-val {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--accent-purple);
}

/* Dropdown Select Control */
.select-ctrl {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(9, 12, 16, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
    transition: border 0.2s ease;
}

.select-ctrl:focus {
    border-color: var(--accent-pink);
}

/* Toggle Switch Control */
.toggle-control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked+.toggle-slider {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
}

input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    cursor: pointer;
    box-shadow: 0 0 8px var(--glow-purple);
    transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Color Pickers Row */
.color-pickers-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.color-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.6rem;
    border-radius: var(--radius-sm);
}

.color-input-wrapper span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

/* Action Buttons */
.button-row {
    display: flex;
    gap: 0.75rem;
}

.btn-ctrl {
    flex: 1;
    padding: 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-ctrl:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Code Modal Overlay */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.modal-header {
    padding: 1.2rem 1.5rem;
    background: #161b22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

pre code {
    font-family: var(--font-code);
    font-size: 0.85rem;
    line-height: 1.6;
    color: #e6edf3;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .viewport-panel {
        height: 550px;
    }
}

/* ==========================================================================
   INTERACTIVE GIFT ENVELOPE COVER OVERLAY
   ========================================================================== */
.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1c1328 0%, #090c10 100%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

.envelope-overlay.opened {
    opacity: 0;
    transform: scale(1.15);
    visibility: hidden;
    pointer-events: none;
}

.envelope-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.envelope-card:hover {
    transform: translateY(-10px) scale(1.04);
}

.envelope-sticker {
    position: relative;
    width: 320px;
    height: 225px;
    background: #ffffff;
    border: 8px solid #ffffff;
    border-radius: 28px;
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.65), 0 0 50px rgba(244, 114, 182, 0.5);
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.envelope-flowers {
    position: absolute;
    top: -85px;
    width: 270px;
    height: 165px;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.envelope-flower-svg {
    width: 100%;
    height: 100%;
}

.envelope-body {
    position: relative;
    width: 100%;
    height: 130px;
    background: linear-gradient(140deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 3px solid #cbd5e1;
    border-radius: 0 0 16px 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 3px 6px rgba(255, 255, 255, 0.8);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 118px solid transparent;
    border-right: 118px solid transparent;
    border-top: 80px solid #e2e8f0;
    transform-origin: top;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.15));
}

.envelope-card:hover .envelope-flap {
    transform: rotateX(180deg);
}

.envelope-heart-seal {
    position: absolute;
    top: 32px;
    font-size: 1.8rem;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
    animation: heartPulse 1.6s infinite ease-in-out;
}

@keyframes heartPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.22);
    }
}

.envelope-text {
    font-family: var(--font-main);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: #ffffff;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.8), 0 0 25px rgba(244, 114, 182, 0.6);
    animation: textPulseGlow 1.8s infinite alternate ease-in-out;
}

@keyframes textPulseGlow {
    0% {
        opacity: 0.75;
        transform: translateY(0);
    }

    100% {
        opacity: 1.0;
        transform: translateY(-4px);
    }
}

/* ==========================================================================
   FLOATING MUSIC CONTROLLER BUTTON
   ========================================================================== */
.floating-music-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    background: rgba(18, 24, 38, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    color: #ffffff;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(244, 114, 182, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-music-btn:hover {
    background: rgba(244, 114, 182, 0.25);
    border-color: rgba(244, 114, 182, 0.6);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 35px rgba(244, 114, 182, 0.35);
}

.floating-music-btn.playing {
    background: rgba(244, 114, 182, 0.3);
    border-color: var(--accent-pink);
    color: #fbcfe8;
}

/* ==========================================================================
   CLICKABLE FLOATING MESSAGE LETTER CARD AT BOTTOM OVER BOUQUET
   ========================================================================== */
.envelope-letter-card {
    position: fixed;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 250px;
    height: 165px;
    background: #ffb7c5;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 35px rgba(255, 183, 197, 0.6);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    overflow: hidden;
    animation: envelopeCardFloat 3.5s infinite ease-in-out;
}

@keyframes envelopeCardFloat {

    0%,
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
    }

    50% {
        transform: translateX(-50%) translateY(-8px) scale(1.03);
    }
}

.envelope-letter-card:hover {
    transform: translateX(-50%) translateY(-12px) scale(1.07) !important;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6), 0 0 50px rgba(255, 183, 197, 0.9);
    border-color: #ffffff;
}

.envelope-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffc0cb 0%, #ffa4b6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Diagonal envelope folds */
.envelope-fold {
    position: absolute;
    pointer-events: none;
}

.fold-top {
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 125px solid transparent;
    border-right: 125px solid transparent;
    border-top: 85px solid rgba(255, 255, 255, 0.28);
}

.fold-bottom {
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 125px solid transparent;
    border-right: 125px solid transparent;
    border-bottom: 85px solid rgba(255, 255, 255, 0.22);
}

.fold-left {
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 82.5px solid transparent;
    border-bottom: 82.5px solid transparent;
    border-left: 125px solid rgba(255, 255, 255, 0.18);
}

.fold-right {
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-top: 82.5px solid transparent;
    border-bottom: 82.5px solid transparent;
    border-right: 125px solid rgba(255, 255, 255, 0.18);
}

/* Center Heart Seal */
.envelope-center-heart {
    position: relative;
    z-index: 5;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 75, 130, 0.5);
    transition: transform 0.3s ease;
}

.envelope-letter-card:hover .envelope-center-heart {
    transform: scale(1.22) rotate(6deg);
    background: #ffffff;
}

.heart-svg {
    width: 26px;
    height: 26px;
    animation: heartPulse 1.4s infinite ease-in-out;
}

/* Love Letter Modal Overlay */
.letter-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 12, 16, 0.75);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.letter-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.letter-card-paper {
    position: relative;
    width: 90%;
    max-width: 480px;
    background: linear-gradient(145deg, #fff5f7 0%, #fce7f3 100%);
    border: 4px solid #ffffff;
    border-radius: 24px;
    padding: 2.2rem 2rem 1.8rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(244, 114, 182, 0.4);
    transform: scale(0.85) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #831843;
    text-align: center;
}

.letter-modal-backdrop.active .letter-card-paper {
    transform: scale(1) translateY(0);
}

.letter-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #f472b6;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #be123c;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.letter-close-btn:hover {
    background: #be123c;
    color: #ffffff;
    transform: rotate(90deg);
}

.letter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px dashed rgba(244, 114, 182, 0.3);
}

.letter-heart-badge {
    font-size: 2.2rem;
    filter: drop-shadow(0 4px 8px rgba(244, 114, 182, 0.4));
    animation: heartPulse 1.6s infinite ease-in-out;
}

.letter-stamp {
    font-family: var(--font-code);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #be123c;
    border: 2px solid #be123c;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transform: rotate(-4deg);
}

.letter-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #9f1239;
    margin-bottom: 0.75rem;
}

.letter-gif-container {
    margin: 0.5rem auto 1rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.letter-gif {
    max-width: 180px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    mix-blend-mode: multiply;
    filter: drop-shadow(0 4px 10px rgba(244, 114, 182, 0.3));
}

.letter-body p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: #4c0519;
    margin-bottom: 1rem;
    font-weight: 400;
}

.letter-signature {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    font-size: 0.95rem;
    color: #be123c;
}

.signature-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #831843;
}

.letter-footer-decor {
    margin-top: 1.4rem;
    font-size: 1.1rem;
    opacity: 0.8;
}