/* Love Message for Lover - Main Stylesheet */
:root {
    --soft-purple: #f3e8ff;
    --primary-purple: #9b59b6;
    --primary-pink: #ff6b9d;
    --gradient-primary: linear-gradient(135deg, #ff6b9d 0%, #9b59b6 100%);
    --gradient-hover: linear-gradient(135deg, #ff8eb5 0%, #b07cc9 100%);
    --dark-purple: #4a2c5a;
    --light-pink: #ffe4f3;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(155, 89, 182, 0.2);
    --shadow-hover: 0 15px 40px rgba(155, 89, 182, 0.3);
    --border-radius: 20px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* Main Container */
.love-message-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f3e8ff 0%, #ffd9e8 100%);
    position: relative;
    overflow: hidden;
    padding: 40px 20px;
}

.love-message-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Falling Flowers Animation */
.flower-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.flower {
    position: absolute;
    font-size: 24px;
    opacity: 0;
    animation: fall linear infinite;
    filter: drop-shadow(0 0 5px rgba(255, 107, 157, 0.3));
}

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

/* Generate flower positions and delays */
.flower-1 { left: 5%; animation-duration: 8s; animation-delay: 0s; }
.flower-2 { left: 15%; animation-duration: 10s; animation-delay: 2s; }
.flower-3 { left: 25%; animation-duration: 7s; animation-delay: 1s; }
.flower-4 { left: 35%; animation-duration: 12s; animation-delay: 3s; }
.flower-5 { left: 45%; animation-duration: 9s; animation-delay: 0.5s; }
.flower-6 { left: 55%; animation-duration: 11s; animation-delay: 4s; }
.flower-7 { left: 65%; animation-duration: 8s; animation-delay: 1.5s; }
.flower-8 { left: 75%; animation-duration: 13s; animation-delay: 2.5s; }
.flower-9 { left: 85%; animation-duration: 10s; animation-delay: 3.5s; }
.flower-10 { left: 95%; animation-duration: 9s; animation-delay: 0.8s; }
.flower-11 { left: 10%; animation-duration: 14s; animation-delay: 5s; }
.flower-12 { left: 30%; animation-duration: 8s; animation-delay: 2.2s; }
.flower-13 { left: 50%; animation-duration: 11s; animation-delay: 4.5s; }
.flower-14 { left: 70%; animation-duration: 10s; animation-delay: 1.2s; }
.flower-15 { left: 90%; animation-duration: 12s; animation-delay: 3.8s; }

/* Floating Hearts Animation */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.heart {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    animation: float linear infinite;
    filter: drop-shadow(0 0 5px rgba(255, 107, 157, 0.5));
}

@keyframes float {
    0% {
        transform: translateY(110vh) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-10vh) scale(1.5);
        opacity: 0;
    }
}

.heart-1 { left: 20%; animation-duration: 6s; animation-delay: 0s; }
.heart-2 { left: 40%; animation-duration: 8s; animation-delay: 2s; }
.heart-3 { left: 60%; animation-duration: 7s; animation-delay: 1s; }
.heart-4 { left: 80%; animation-duration: 9s; animation-delay: 3s; }
.heart-5 { left: 30%; animation-duration: 5s; animation-delay: 0.5s; }
.heart-6 { left: 50%; animation-duration: 10s; animation-delay: 4s; }
.heart-7 { left: 70%; animation-duration: 7s; animation-delay: 1.5s; }
.heart-8 { left: 90%; animation-duration: 8s; animation-delay: 2.5s; }
.heart-9 { left: 15%; animation-duration: 6s; animation-delay: 3.5s; }
.heart-10 { left: 85%; animation-duration: 9s; animation-delay: 0.8s; }

/* Main Card */
.love-message-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 20;
    animation: fadeIn 1s ease;
    max-width: 800px;
    margin: 0 auto;
}

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

.love-title {
    font-size: 2.5em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 700;
}

.love-subtitle {
    text-align: center;
    color: var(--dark-purple);
    font-size: 1.1em;
    margin-bottom: 30px;
    opacity: 0.8;
}

/* Form Elements */
.relationship-selector,
.tone-selector,
.length-selector {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-purple);
    font-weight: 500;
    font-size: 0.95em;
}

.love-select {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--light-pink);
    border-radius: 50px;
    font-size: 1em;
    color: var(--dark-purple);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b59b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

.love-select:hover {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.love-select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(155, 89, 182, 0.1);
}

/* Name Fields */
.name-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    flex: 1;
}

.love-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--light-pink);
    border-radius: 50px;
    font-size: 1em;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.love-input:hover {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.love-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(155, 89, 182, 0.1);
}

/* Buttons */
.love-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.love-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.love-button:active {
    transform: translateY(0);
}

.love-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.love-button:hover::before {
    width: 300px;
    height: 300px;
}

.generate-btn {
    width: 100%;
    margin: 30px 0;
    padding: 15px;
    font-size: 1.2em;
    letter-spacing: 1px;
}

/* Message Card */
.message-card {
    background: var(--gradient-primary);
    padding: 40px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    position: relative;
    overflow: hidden;
    animation: glowPulse 3s infinite;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(155, 89, 182, 0.5);
    }
}

.message-content {
    color: white;
    font-size: 1.1em;
    line-height: 1.8;
    white-space: pre-wrap;
    min-height: 100px;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.message-watermark {
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    z-index: 1;
}

/* Typing Animation */
.typing-animation {
    overflow: hidden;
    border-right: 3px solid white;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: white; }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.copy-btn, .download-btn, .reset-btn {
    min-width: 120px;
    background: var(--gradient-primary);
}

/* Social Sharing */
.social-sharing {
    text-align: center;
    margin-top: 30px;
}

.social-sharing h3 {
    color: var(--dark-purple);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: var(--transition);
    background: var(--gradient-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

/* Responsive Design */
@media (max-width: 768px) {
    .love-message-card {
        padding: 20px;
    }
    
    .love-title {
        font-size: 1.8em;
    }
    
    .name-fields {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .love-button {
        width: 100%;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .social-btn {
        width: 100%;
    }
}

/* Loading Animation */
@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.heartbeat {
    animation: heartbeat 1s ease infinite;
}

/* Focus Visible for Accessibility */
.love-button:focus-visible,
.love-select:focus-visible,
.love-input:focus-visible,
.social-btn:focus-visible {
    outline: 3px solid var(--primary-purple);
    outline-offset: 3px;
}

/* Print Styles */
@media print {
    .flower-container,
    .hearts-container,
    .action-buttons,
    .social-sharing,
    .love-button {
        display: none;
    }
    
    .love-message-card {
        box-shadow: none;
        border: 2px solid var(--primary-purple);
    }
}

/* Schema Markup - Hidden but present */
[itemscope] {
    display: contents;
}