/* Magic Love Letter Generator Part Two - Romantic Style */

:root {
    --primary-pink: #FF69B4;
    --primary-purple: #6C2BD9;
    --light-pink: #FFF0F5;
    --light-purple: #F3E5FF;
    --white: #FFFFFF;
    --soft-shadow: 0 10px 30px rgba(108, 43, 217, 0.1);
    --gradient: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    --gradient-hover: linear-gradient(135deg, var(--primary-purple), var(--primary-pink));
}

/* Container */
.mllg-part-two-container {
    position: relative;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    background: var(--white);
    overflow: hidden;
}

/* Floating Hearts & Flowers Animation */
.mllg-part-two-floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.heart {
    position: absolute;
    font-size: 24px;
    animation: float 6s infinite ease-in-out;
    opacity: 0.6;
}

.heart1 { top: 10%; left: 5%; animation-delay: 0s; }
.heart2 { top: 20%; right: 10%; animation-delay: 1s; }
.heart3 { bottom: 30%; left: 15%; animation-delay: 2s; }
.heart4 { bottom: 40%; right: 20%; animation-delay: 3s; }
.heart5 { top: 50%; left: 25%; animation-delay: 4s; }
.heart6 { top: 70%; right: 30%; animation-delay: 5s; }
.heart7 { bottom: 20%; left: 40%; animation-delay: 6s; }
.heart8 { bottom: 60%; right: 15%; animation-delay: 7s; }

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

/* Main Card */
.mllg-part-two-generator-card {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(255, 105, 180, 0.2);
}

/* Header */
.mllg-part-two-header {
    text-align: center;
    margin-bottom: 40px;
}

.mllg-part-two-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5em;
    color: var(--primary-purple);
    margin: 0 0 10px;
    text-shadow: 2px 2px 4px rgba(108, 43, 217, 0.1);
}

.title-emoji {
    display: inline-block;
    margin: 0 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.mllg-part-two-subtitle {
    font-size: 1.2em;
    color: #666;
    margin: 0;
    font-weight: 300;
}

/* Form */
.mllg-part-two-form {
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

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

.form-group .required {
    color: var(--primary-pink);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 15px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

.form-group input:hover,
.form-group select:hover {
    border-color: var(--primary-purple);
}

/* Submit Button */
.mllg-part-two-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.mllg-part-two-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 105, 180, 0.3);
    background: var(--gradient-hover);
}

.mllg-part-two-submit-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.3em;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Loading Animation */
.mllg-part-two-loading {
    text-align: center;
    padding: 40px;
}

.loading-hearts span {
    font-size: 2em;
    display: inline-block;
    animation: heartBeat 1.2s infinite;
    margin: 0 5px;
}

.loading-hearts span:nth-child(1) { animation-delay: 0s; }
.loading-hearts span:nth-child(2) { animation-delay: 0.2s; }
.loading-hearts span:nth-child(3) { animation-delay: 0.4s; }
.loading-hearts span:nth-child(4) { animation-delay: 0.6s; }

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--primary-pink); }
}

.mllg-part-two-loading p {
    margin-top: 20px;
    color: var(--primary-purple);
    font-size: 1.2em;
    font-weight: 500;
}

/* Result Section */
.mllg-part-two-result {
    background: linear-gradient(135deg, var(--light-pink), var(--light-purple));
    border-radius: 25px;
    margin-top: 30px;
    animation: slideUp 0.5s ease;
}

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

.result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.result-header h3 {
    font-size: 1.8em;
    color: var(--primary-purple);
    margin: 0;
    font-family: 'Dancing Script', cursive;
}

.header-emoji {
    font-size: 2em;
}

.letter-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    font-family: 'Dancing Script', cursive;
    font-size: 1.3em;
    line-height: 1.8;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    white-space: pre-wrap;
    min-height: 200px;
    border: 1px solid rgba(255, 105, 180, 0.2);
}

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

@keyframes typing {
    from { max-height: 0; }
    to { max-height: 500px; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-pink); }
}

/* Result Actions */
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #333;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.copy-btn:hover { background: #f0f0f0; }
.whatsapp-btn:hover { background: #25D366; color: white; }
.facebook-btn:hover { background: #1877F2; color: white; }
.instagram-btn:hover { background: linear-gradient(45deg, #f09433, #d62976, #962fbf); color: white; }
.save-btn:hover { background: var(--primary-pink); color: white; }
.regenerate-btn:hover { background: var(--primary-purple); color: white; }

/* Tips Section */
.mllg-part-two-tips-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px dashed var(--primary-pink);
}

.tips-title {
    text-align: center;
    font-size: 2em;
    color: var(--primary-purple);
    margin-bottom: 30px;
    font-family: 'Dancing Script', cursive;
}

.tip-icon {
    margin: 0 10px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.tip-card {
    background: white;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 105, 180, 0.1);
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.2);
    border-color: var(--primary-pink);
}

.tip-card .tip-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.tip-card h4 {
    color: var(--primary-purple);
    margin: 10px 0;
    font-size: 1.2em;
}

.tip-card p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0;
}

/* Favorites Section */
.mllg-part-two-favorites {
    margin-top: 40px;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.favorite-item {
    background: white;
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 105, 180, 0.2);
    transition: all 0.3s ease;
}

.favorite-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.15);
    border-color: var(--primary-pink);
}

/* Success Message */
.mllg-part-two-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gradient);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Print Styles */
@media print {
    .mllg-part-two-floating-elements,
    .result-actions,
    .mllg-part-two-tips-section,
    .mllg-part-two-submit-btn,
    .mllg-part-two-favorites {
        display: none !important;
    }
    
    .mllg-part-two-result {
        background: white;
        box-shadow: none;
    }
    
    .letter-content {
        border: 1px solid #ddd;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mllg-part-two-generator-card {
        padding: 30px 20px;
    }
    
    .mllg-part-two-title {
        font-size: 2.5em;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .mllg-part-two-title {
        font-size: 2em;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .letter-content {
        font-size: 1.1em;
        padding: 20px;
    }
}