/* love languages quiz css */

body {
    font-family: 'Arial', sans-serif;
}

main {
    max-width: 800px;
    margin: 2rem auto;
    margin-top: 12rem;/* To prevent main content from being hidden underneath the fixed header */
    padding: 0 1rem;
    min-height: fit-content;
    background-color: #FFE066;
    border-radius: 20px;
    overflow: hidden;
}

.app-container {
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    background: linear-gradient(135deg, #d9a3c8 0%, #cc339b 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 40px;
    overflow: hidden;
    min-height: 400px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 auto;
}

.welcome-screen {
    animation: fadeIn 0.8s ease-in;
    text-align: center;
    padding: 2rem 0.5rem;
    color: white;
}

.app-title {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #e7464c, #fecfef, #d3cb0f);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    margin-bottom: 20px;
}

.app-subtitle {
    font-size: 1.2rem;
    color: white;
    line-height: 1.6;
    margin-bottom: 40px;
}

.begin-btn {
    /*background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);*/
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    color: #4a5568;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 154, 158, 0.4);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.begin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.begin-btn:active {
    transform: translateY(0);
}

/* Quiz Screen */
.quiz-screen {
    display: none;
    animation: slideIn 0.5s ease-out;
    /*max-width: 500px;*/ /* 800px changes the size of answer screen a lot while answers progress */
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.question-counter {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.question-text {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.5;
}

.answers-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 40px;
}

.answer-btn {/* each answer option */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1.4;
    text-align: left;
}

.answer-btn:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.answer-btn.selected {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
    transform: translateY(-2px);
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-btn {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.nav-btn:hover:not(:disabled) {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.next-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
}

/* Results Screen */
.results-screen {
    display: none;
    animation: fadeIn 0.8s ease-in;
}

.result-title {
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 15px;
}

.result-language {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    margin-bottom: 30px;
}

.result-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 30px;
    text-align: left;
}

.restart-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    main {
        margin: 0 10px;
        padding: 10px 0;
        margin-top: 3.5rem;/* To prevent main content from being hidden underneath the fixed header */
    }

    .app-container {
        padding: 1rem;
        margin: 0 auto;
    }

    .site-header h1 {
        font-size: 1.4rem;
    }

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

    .app-subtitle {
        font-size: 1rem;
    }

    .question-text {
        font-size: 1.2rem;
    }

    .answer-btn {
        padding: 15px;
        font-size: 0.95rem;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
    }

    .result-language {
        font-size: 2.5rem;
    }

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

@media (max-width: 480px) {
    main {
        margin: 0 0;
        padding: 10px 0;
        margin-top: 3.5rem;/* To prevent main content from being hidden underneath the fixed header */
    }

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

    .app-subtitle {
        font-size: 0.9rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .answer-btn {
        font-size: 0.9rem;
    }

    .result-language {
        font-size: 2.2rem;
    }

    .text-2xl {/* title of each category */
        font-size: 1.4rem;
        line-height: 2rem;
    }
}

@media screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
    main {
        margin-top: 5.5rem;
    }
}