How To Know About My Date / Life Partner?

 Finding the right life partner is a big decision—one that can shape your happiness and future. But how do you really know if someone is the right match for you? Whether you're dating someone new or exploring compatibility with a potential partner, here are some key ways to understand them better.



1. Observe Their Communication Style

Good communication is the foundation of any strong relationship. Pay attention to:

How they listen – Do they pay attention or interrupt often?

How they express emotions – Are they open or reserved?

Their honesty – Do they share their thoughts truthfully?

A partner who communicates well can resolve conflicts smoothly and build trust.

2. Check Emotional Compatibility

Do you feel emotionally safe with them? Ask yourself:

Do they respect your feelings?

Are they supportive during tough times?

Do your values and life goals align?

Emotional connection is just as important as physical attraction.

3. See How They Treat Others

The way a person treats family, friends, and even strangers says a lot about their character. Notice:

Are they kind and respectful to everyone?

How do they handle disagreements?

Do they show empathy?

Someone who is rude or dismissive to others may not treat you well in the long run.

4. Test Compatibility Through Experiences

Spend time together in different situations:

Traveling (even a short trip can reveal habits)

Handling stress (see how they react under pressure)

Meeting each other’s friends & family (do they fit into your world?)

Real-life experiences help you see if you’re truly compatible.

5. Trust Your Intuition

Sometimes, your gut feeling knows best. Ask yourself:

Do I feel happy and secure with them?

Do I see a future with this person?

Are there any red flags I’m ignoring?

If something feels off, don’t ignore it.

Want a Quick Compatibility Check?

Final Thoughts

Knowing your partner deeply takes time, but observing their behavior, communication, and values can help you make the right choice. Don’t rush—take the time to understand if they’re truly the one for you.

HTML SCRIPT

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Dream Partner Finder - Discover Your Perfect Match</title>

    <style>

        :root {

            --primary: #8e44ad;

            --secondary: #9b59b6;

            --light: #f5eef8;

            --dark: #2c3e50;

            --accent: #e74c3c;

        }

        

        * {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

        }

        

        body {

            background-color: var(--light);

            color: var(--dark);

            line-height: 1.6;

        }

        

        header {

            background: linear-gradient(135deg, var(--primary), var(--secondary));

            color: white;

            padding: 1rem 0;

            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

            position: sticky;

            top: 0;

            z-index: 100;

        }

        

        .container {

            width: 90%;

            max-width: 1200px;

            margin: 0 auto;

        }

        

        .header-content {

            display: flex;

            justify-content: space-between;

            align-items: center;

        }

        

        .logo {

            font-size: 1.8rem;

            font-weight: 700;

            animation: fadeIn 1s ease-in-out;

        }

        

        .logo span {

            color: var(--accent);

        }

        

        nav ul {

            display: flex;

            list-style: none;

        }

        

        nav ul li {

            margin-left: 1.5rem;

        }

        

        nav ul li a {

            color: white;

            text-decoration: none;

            font-weight: 500;

            transition: all 0.3s ease;

        }

        

        nav ul li a:hover {

            color: var(--accent);

        }

        

        .hero {

            padding: 4rem 0;

            text-align: center;

            background: url('https://images.unsplash.com/photo-1516589178581-6cd7833ae3b2?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;

            position: relative;

            color: white;

        }

        

        .hero::before {

            content: '';

            position: absolute;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

            background: rgba(46, 46, 46, 0.7);

        }

        

        .hero-content {

            position: relative;

            z-index: 1;

            max-width: 800px;

            margin: 0 auto;

        }

        

        .hero h1 {

            font-size: 3rem;

            margin-bottom: 1rem;

            animation: slideUp 1s ease-in-out;

        }

        

        .hero p {

            font-size: 1.2rem;

            margin-bottom: 2rem;

            animation: slideUp 1.2s ease-in-out;

        }

        

        .btn {

            display: inline-block;

            background-color: var(--accent);

            color: white;

            padding: 0.8rem 1.8rem;

            border: none;

            border-radius: 50px;

            font-size: 1rem;

            font-weight: 600;

            text-decoration: none;

            cursor: pointer;

            transition: all 0.3s ease;

            animation: fadeIn 1.5s ease-in-out;

        }

        

        .btn:hover {

            background-color: #c0392b;

            transform: translateY(-3px);

            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);

        }

        

        .quiz-section {

            padding: 4rem 0;

            background-color: white;

        }

        

        .section-title {

            text-align: center;

            margin-bottom: 3rem;

        }

        

        .section-title h2 {

            font-size: 2.5rem;

            color: var(--primary);

            position: relative;

            display: inline-block;

        }

        

        .section-title h2::after {

            content: '';

            position: absolute;

            bottom: -10px;

            left: 50%;

            transform: translateX(-50%);

            width: 80px;

            height: 4px;

            background-color: var(--accent);

            border-radius: 2px;

        }

        

        .quiz-container {

            max-width: 800px;

            margin: 0 auto;

            background-color: var(--light);

            border-radius: 10px;

            padding: 2rem;

            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

        }

        

        .question {

            display: none;

            animation: fadeIn 0.5s ease-in-out;

        }

        

        .question.active {

            display: block;

        }

        

        .question h3 {

            font-size: 1.5rem;

            margin-bottom: 1.5rem;

            color: var(--primary);

        }

        

        .options {

            display: grid;

            grid-template-columns: 1fr;

            gap: 1rem;

        }

        

        .option {

            background-color: white;

            padding: 1rem;

            border-radius: 8px;

            cursor: pointer;

            transition: all 0.3s ease;

            border: 2px solid transparent;

        }

        

        .option:hover {

            transform: translateY(-3px);

            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);

            border-color: var(--primary);

        }

        

        .option.selected {

            background-color: var(--primary);

            color: white;

            border-color: var(--primary);

        }

        

        .quiz-navigation {

            display: flex;

            justify-content: space-between;

            margin-top: 2rem;

        }

        

        .quiz-btn {

            padding: 0.8rem 1.5rem;

            border: none;

            border-radius: 50px;

            font-weight: 600;

            cursor: pointer;

            transition: all 0.3s ease;

        }

        

        .quiz-btn:disabled {

            opacity: 0.5;

            cursor: not-allowed;

        }

        

        .prev-btn {

            background-color: #f1f1f1;

            color: var(--dark);

        }

        

        .next-btn {

            background-color: var(--primary);

            color: white;

        }

        

        .next-btn:hover {

            background-color: var(--secondary);

        }

        

        .result {

            display: none;

            text-align: center;

            animation: fadeIn 1s ease-in-out;

        }

        

        .result h3 {

            font-size: 2rem;

            color: var(--primary);

            margin-bottom: 1.5rem;

        }

        

        .result-img {

            width: 200px;

            height: 200px;

            border-radius: 50%;

            object-fit: cover;

            margin: 0 auto 2rem;

            border: 5px solid var(--primary);

            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);

        }

        

        .result-qualities {

            background-color: white;

            padding: 1.5rem;

            border-radius: 10px;

            margin-bottom: 2rem;

            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);

        }

        

        .result-qualities h4 {

            font-size: 1.3rem;

            color: var(--primary);

            margin-bottom: 1rem;

        }

        

        .result-qualities ul {

            list-style: none;

            text-align: left;

            max-width: 500px;

            margin: 0 auto;

        }

        

        .result-qualities ul li {

            margin-bottom: 0.8rem;

            position: relative;

            padding-left: 1.5rem;

        }

        

        .result-qualities ul li::before {

            content: '✓';

            position: absolute;

            left: 0;

            color: var(--accent);

            font-weight: bold;

        }

        

        .restart-btn {

            background-color: var(--accent);

            color: white;

        }

        

        .restart-btn:hover {

            background-color: #c0392b;

        }

        

        .features {

            padding: 4rem 0;

            background-color: var(--light);

        }

        

        .features-grid {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));

            gap: 2rem;

            margin-top: 2rem;

        }

        

        .feature-card {

            background-color: white;

            padding: 2rem;

            border-radius: 10px;

            text-align: center;

            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);

            transition: all 0.3s ease;

        }

        

        .feature-card:hover {

            transform: translateY(-10px);

            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);

        }

        

        .feature-icon {

            font-size: 3rem;

            color: var(--primary);

            margin-bottom: 1.5rem;

        }

        

        .feature-card h3 {

            font-size: 1.5rem;

            margin-bottom: 1rem;

            color: var(--primary);

        }

        

        footer {

            background-color: var(--dark);

            color: white;

            padding: 3rem 0 1rem;

        }

        

        .footer-content {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

            gap: 2rem;

            margin-bottom: 2rem;

        }

        

        .footer-column h3 {

            font-size: 1.3rem;

            margin-bottom: 1.5rem;

            position: relative;

            padding-bottom: 0.5rem;

        }

        

        .footer-column h3::after {

            content: '';

            position: absolute;

            bottom: 0;

            left: 0;

            width: 50px;

            height: 2px;

            background-color: var(--accent);

        }

        

        .footer-column ul {

            list-style: none;

        }

        

        .footer-column ul li {

            margin-bottom: 0.8rem;

        }

        

        .footer-column ul li a {

            color: #ecf0f1;

            text-decoration: none;

            transition: all 0.3s ease;

        }

        

        .footer-column ul li a:hover {

            color: var(--accent);

            padding-left: 5px;

        }

        

        .social-links {

            display: flex;

            gap: 1rem;

        }

        

        .social-links a {

            display: inline-flex;

            align-items: center;

            justify-content: center;

            width: 40px;

            height: 40px;

            background-color: rgba(255, 255, 255, 0.1);

            border-radius: 50%;

            color: white;

            transition: all 0.3s ease;

        }

        

        .social-links a:hover {

            background-color: var(--accent);

            transform: translateY(-3px);

        }

        

        .copyright {

            text-align: center;

            padding-top: 1.5rem;

            border-top: 1px solid rgba(255, 255, 255, 0.1);

            font-size: 0.9rem;

            color: #bdc3c7;

        }

        

        /* Animations */

        @keyframes fadeIn {

            from { opacity: 0; }

            to { opacity: 1; }

        }

        

        @keyframes slideUp {

            from { 

                opacity: 0;

                transform: translateY(20px);

            }

            to { 

                opacity: 1;

                transform: translateY(0);

            }

        }

        

        /* Responsive Styles */

        @media (max-width: 768px) {

            .header-content {

                flex-direction: column;

                text-align: center;

            }

            

            nav ul {

                margin-top: 1rem;

                justify-content: center;

            }

            

            nav ul li {

                margin: 0 0.8rem;

            }

            

            .hero h1 {

                font-size: 2.2rem;

            }

            

            .hero p {

                font-size: 1rem;

            }

            

            .section-title h2 {

                font-size: 2rem;

            }

            

            .quiz-container {

                padding: 1.5rem;

            }

            

            .question h3 {

                font-size: 1.3rem;

            }

        }

        

        @media (max-width: 480px) {

            .hero h1 {

                font-size: 1.8rem;

            }

            

            .btn {

                padding: 0.6rem 1.5rem;

            }

            

            .quiz-navigation {

                flex-direction: column;

                gap: 1rem;

            }

            

            .quiz-btn {

                width: 100%;

            }

        }

    </style>

</head>

<body>

    <header>

        <div class="container header-content">

            <div class="logo">Dream <span>Partner</span></div>

            <nav>

                <ul>

                    <li><a href="#home">Home</a></li>

                    <li><a href="#quiz">Quiz</a></li>

                    <li><a href="#features">Features</a></li>

                    <li><a href="#contact">Contact</a></li>

                </ul>

            </nav>

        </div>

    </header>

    

    <section class="hero" id="home">

        <div class="hero-content">

            <h1>Discover Your Perfect Life Partner</h1>

            <p>Answer 5 simple questions to find out what qualities your ideal partner should have, including astrological compatibility.</p>

            <a href="#quiz" class="btn">Start Quiz Now</a>

        </div>

    </section>

   

    <section class="quiz-section" id="quiz">  <center> techpk </center>

        <div class="container">

            <div class="section-title">

                <h2>Find Your Dream Partner</h2>

            </div>

            

            <div class="quiz-container">

                <div class="question active" id="question1">

                    <h3>1. What would be your perfect first date?</h3>

                    <div class="options">

                        <div class="option" data-value="romantic">Candlelit dinner with wine</div>

                        <div class="option" data-value="adventurous">Trying something new together</div>

                        <div class="option" data-value="intellectual">Deep conversation at a quiet place</div>

                        <div class="option" data-value="casual">Netflix and takeout at home</div>

                    </div>

                </div>

                

                <div class="question" id="question2">

                    <h3>2. What's the most important quality in a partner?</h3>

                    <div class="options">

                        <div class="option" data-value="honesty">They're always truthful</div>

                        <div class="option" data-value="humor">They make me laugh</div>

                        <div class="option" data-value="ambition">They have big dreams</div>

                        <div class="option" data-value="kindness">They're caring and warm</div>

                    </div>

                </div>

                

                <div class="question" id="question3">

                    <h3>3. When you disagree with your partner, you usually:</h3>

                    <div class="options">

                        <div class="option" data-value="communicate">Talk it out immediately</div>

                        <div class="option" data-value="space">Need time alone first</div>

                        <div class="option" data-value="compromise">Find middle ground</div>

                        <div class="option" data-value="avoid">Change the subject</div>

                    </div>

                </div>

                

                <div class="question" id="question4">

                    <h3>4. What's your star sign (zodiac)?</h3>

                    <div class="options">

                        <div class="option" data-value="fire">Aries, Leo, Sagittarius (Fire)</div>

                        <div class="option" data-value="earth">Taurus, Virgo, Capricorn (Earth)</div>

                        <div class="option" data-value="air">Gemini, Libra, Aquarius (Air)</div>

                        <div class="option" data-value="water">Cancer, Scorpio, Pisces (Water)</div>

                    </div>

                </div>

                

                <div class="question" id="question5">

                    <h3>5. What first attracts you to someone?</h3>

                    <div class="options">

                        <div class="option" data-value="personality">How they treat others</div>

                        <div class="option" data-value="intelligence">How they think</div>

                        <div class="option" data-value="appearance">How they look</div>

                        <div class="option" data-value="confidence">How they carry themselves</div>

                    </div>

                </div>

                

                <div class="quiz-navigation">

                    <button class="quiz-btn prev-btn" disabled>Previous</button>

                    <button class="quiz-btn next-btn">Next</button>

                </div>

                

                <div class="result">

                    <h3>Your Ideal Partner</h3>

                    <img src="https://images.unsplash.com/photo-1534528741775-53994a69daeb?ixlib=rb-1.2.1&auto=format&fit=crop&w=400&q=80" alt="Dream Partner" class="result-img">

                    <div class="result-qualities">

                        <h4>Perfect Qualities For You</h4>

                        <ul id="qualities-list">

                            <!-- Filled by JavaScript -->

                        </ul>

                    </div>

                    <p><strong>Best Star Sign Match:</strong> <span id="star-sign">Libra</span></p>

                    <button class="btn restart-btn">Try Again</button>

                </div>

            </div>

        </div>

    </section>

    

    <section class="features" id="features">

        <div class="container"><center> techpk </center>

            <div class="section-title">

                <h2>Why Our Quiz Works</h2>

            </div>

            

            <div class="features-grid">

                <div class="feature-card">

                    <div class="feature-icon">💖</div>

                    <h3>Personality Matching</h3>

                    <p>We analyze your answers to find personality traits that complement yours perfectly.</p>

                </div>

                

                <div class="feature-card">

                    <div class="feature-icon">✨</div>

                    <h3>Zodiac Compatibility</h3>

                    <p>Our system considers astrological signs to identify cosmic connections.</p>

                </div>

                

                <div class="feature-card">

                    <div class="feature-icon">🔮</div>

                    <h3>Dream Interpretation</h3>

                    <p>We decode your relationship desires to find someone who matches your vision.</p>

                </div>

            </div>

        </div>

    </section>

    

    <footer id="contact">

        <div class="container">

            <div class="footer-content">

                <div class="footer-column">

                    <h3>Dream Partner Finder</h3>

                    <p>Find your perfect life match based on personality, values, and astrological compatibility.</p>

                </div>

                

                <div class="footer-column">

                    <h3>Quick Links</h3>

                    <ul>

                        <li><a href="#home">Home</a></li>

                        <li><a href="#quiz">Take the Quiz</a></li>

                        <li><a href="#features">How It Works</a></li>

                        <li><a href="adsterra">Contact Us</a></li>

                    </ul>

                </div>

                

                <div class="footer-column">

                    <h3>Connect</h3>

                    <div class="social-links">

                        <a href="adsterra"><i class="fab fa-facebook-f">f</i></a>

                        <a href="adsterra"><i class="fab fa-twitter">t</i></a>

                        <a href="adsterra"><i class="fab fa-instagram">i</i></a>

                    </div>

                    <p style="margin-top: 1rem;">contact@dreampartner.com</p>

                </div>

            </div>

            

            <div class="copyright">

                <p>&copy; 2023 Dream Partner Finder. All rights reserved.</p>

            </div>

        </div>

    </footer>

    

    <script>

        document.addEventListener('DOMContentLoaded', function() {

            // Quiz functionality

            const questions = document.querySelectorAll('.question');

            const prevBtn = document.querySelector('.prev-btn');

            const nextBtn = document.querySelector('.next-btn');

            const restartBtn = document.querySelector('.restart-btn');

            const resultSection = document.querySelector('.result');

            let currentQuestion = 0;

            

            // Partner qualities based on answers

            const partnerQualities = {

                romantic: ["Romantic gestures come naturally", "Thoughtful gift-giver", "Loves celebrating special moments", "Enjoys deep emotional connection"],

                adventurous: ["Always up for new experiences", "Spontaneous and fun-loving", "Encourages you to try new things", "Makes everyday feel exciting"],

                intellectual: ["Great conversationalist", "Constantly learning new things", "Challenges you mentally", "Shares interesting perspectives"],

                casual: ["Comfortable with silence", "Low-maintenance relationship style", "Values cozy nights in", "Loves simple pleasures"],

                honesty: ["Always tells the truth", "Keeps their promises", "Open about feelings", "You never doubt their word"],

                humor: ["Makes you laugh daily", "Doesn't take life too seriously", "Lightens tense moments", "Playful and fun"],

                ambition: ["Has clear life goals", "Motivated to succeed", "Inspires you to grow", "Values self-improvement"],

                kindness: ["Puts others first", "Volunteers or helps people", "Gentle and compassionate", "Animals love them"],

                communicate: ["Expresses feelings clearly", "Good listener", "Wants to resolve conflicts", "Patient during disagreements"],

                space: ["Understands your need for alone time", "Has own hobbies/friends", "Not clingy or needy", "Respects boundaries"],

                compromise: ["Always fair in arguments", "Looks for win-win solutions", "Willing to meet halfway", "Diplomatic communicator"],

                avoid: ["Keeps peace in relationship", "Doesn't hold grudges", "Quick to forgive", "Focuses on positive"],

                fire: ["Passionate and energetic", "Brings excitement to your life", "Encourages your ambitions", "Spontaneous lover"],

                earth: ["Dependable and stable", "Great with finances", "Practical problem-solver", "Keeps you grounded"],

                air: ["Stimulating conversationalist", "Social and charming", "Brings new ideas", "Helps you see different views"],

                water: ["Deeply intuitive", "Emotionally supportive", "Strong spiritual connection", "Loving and affectionate"],

                personality: ["Values align with yours", "Treats everyone with respect", "Good moral character", "Emotionally mature"],

                intelligence: ["Well-educated or self-taught", "Curious about the world", "Can discuss many topics", "Lifelong learner"],

                appearance: ["Takes pride in their looks", "Good personal style", "Takes care of health", "Physically attractive to you"],

                confidence: ["Comfortable in their skin", "Not jealous or insecure", "Takes initiative", "Positive self-image"]

            };

            

            // Star sign matches

            const starSignMatches = {

                fire: "Aries, Leo or Sagittarius",

                earth: "Taurus, Virgo or Capricorn",

                air: "Gemini, Libra or Aquarius",

                water: "Cancer, Scorpio or Pisces",

                romantic: "Libra",

                adventurous: "Sagittarius",

                intellectual: "Aquarius",

                casual: "Taurus",

                honesty: "Scorpio",

                humor: "Gemini",

                ambition: "Capricorn",

                kindness: "Pisces",

                communicate: "Virgo",

                space: "Aries",

                compromise: "Libra",

                avoid: "Cancer",

                personality: "Leo",

                intelligence: "Aquarius",

                appearance: "Libra",

                confidence: "Aries"

            };

            

            // Store user answers

            let userAnswers = [];

            

            // Option selection

            document.querySelectorAll('.option').forEach(option => {

                option.addEventListener('click', function() {

                    // Remove selected class from all options in current question

                    const currentOptions = this.parentElement.querySelectorAll('.option');

                    currentOptions.forEach(opt => opt.classList.remove('selected'));

                    

                    // Add selected class to clicked option

                    this.classList.add('selected');

                    

                    // Enable next button

                    nextBtn.disabled = false;

                });

            });

            

            // Next button click

            nextBtn.addEventListener('click', function() {

                // Get selected option

                const selectedOption = questions[currentQuestion].querySelector('.option.selected');

                

                if (selectedOption) {

                    // Store answer

                    userAnswers.push(selectedOption.dataset.value);

                    

                    // Hide current question

                    questions[currentQuestion].classList.remove('active');

                    

                    // Show next question or result

                    if (currentQuestion < questions.length - 1) {

                        currentQuestion++;

                        questions[currentQuestion].classList.add('active');

                        prevBtn.disabled = false;

                        nextBtn.disabled = true;

                        

                        // Change next button text if last question

                        if (currentQuestion === questions.length - 1) {

                            nextBtn.textContent = 'Get Results';

                        }

                    } else {

                        // Show results

                        showResults();

                    }

                }

            });

            

            // Previous button click

            prevBtn.addEventListener('click', function() {

                // Remove last answer

                userAnswers.pop();

                

                // Hide current question

                questions[currentQuestion].classList.remove('active');

                

                // Show previous question

                currentQuestion--;

                questions[currentQuestion].classList.add('active');

                nextBtn.disabled = false;

                nextBtn.textContent = currentQuestion === questions.length - 2 ? 'Get Results' : 'Next';

                

                // Disable prev button if first question

                if (currentQuestion === 0) {

                    prevBtn.disabled = true;

                }

            });

            

            // Restart quiz

            restartBtn.addEventListener('click', function() {

                // Reset quiz

                resultSection.style.display = 'none';

                document.querySelector('.quiz-navigation').style.display = 'flex';

                questions[currentQuestion].classList.remove('active');

                currentQuestion = 0;

                questions[currentQuestion].classList.add('active');

                prevBtn.disabled = true;

                nextBtn.disabled = true;

                nextBtn.textContent = 'Next';

                userAnswers = [];

                

                // Clear all selections

                document.querySelectorAll('.option').forEach(option => {

                    option.classList.remove('selected');

                });

            });

            

            // Show results

            function showResults() {

                // Hide quiz navigation

                document.querySelector('.quiz-navigation').style.display = 'none';

                

                // Get zodiac answer (question 4)

                const zodiacAnswer = userAnswers[3]; // 4th question (0-indexed)

                

                // Display star sign match

                if (starSignMatches[zodiacAnswer]) {

                    document.getElementById('star-sign').textContent = starSignMatches[zodiacAnswer];

                }

                

                // Display qualities from all answers

                const qualitiesList = document.getElementById('qualities-list');

                qualitiesList.innerHTML = '';

                

                // Get unique answers to avoid duplicate qualities

                const uniqueAnswers = [...new Set(userAnswers)];

                

                uniqueAnswers.forEach(answer => {

                    if (partnerQualities[answer]) {

                        // Pick 1-2 qualities from each answer category

                        const shuffled = partnerQualities[answer].sort(() => 0.5 - Math.random());

                        const selectedQualities = shuffled.slice(0, answer === zodiacAnswer ? 2 : 1);

                        

                        selectedQualities.forEach(quality => {

                            const li = document.createElement('li');

                            li.textContent = quality;

                            qualitiesList.appendChild(li);

                        });

                    }

                });

                

                // Show result section

                resultSection.style.display = 'block';

            }

            

            // Smooth scrolling for navigation links

            document.querySelectorAll('a[href^="#"]').forEach(anchor => {

                anchor.addEventListener('click', function(e) {

                    e.preventDefault();

                    

                    const targetId = this.getAttribute('href');

                    const targetElement = document.querySelector(targetId);

                    

                    if (targetElement) {

                        window.scrollTo({

                            top: targetElement.offsetTop - 80,

                            behavior: 'smooth'

                        });

                    }

                });

            });

            

            // Animation on scroll

            function animateOnScroll() {

                const elements = document.querySelectorAll('.feature-card, .section-title');

                

                elements.forEach(element => {

                    const elementPosition = element.getBoundingClientRect().top;

                    const screenPosition = window.innerHeight / 1.3;

                    

                    if (elementPosition < screenPosition) {

                        element.style.opacity = '1';

                        element.style.transform = 'translateY(0)';

                    }

                });

            }

            

            // Set initial state for animation

            document.querySelectorAll('.feature-card').forEach(card => {

                card.style.opacity = '0';

                card.style.transform = 'translateY(20px)';

                card.style.transition = 'all 0.6s ease';

            });

            

            window.addEventListener('scroll', animateOnScroll);

            animateOnScroll(); // Trigger once on load

        });

    </script>

</body>

</html>


No comments:

Post a Comment

If you have any question you can ask me feelfree.