/* ===========================================
 * Spiritual Gifts Suite - Shared Styles
 * =========================================== */

:root {
    --primary-color: #673AB7; /* Deep Purple */
    --secondary-color: #9575CD; /* Light Purple */
    --accent-color: #FFAB00;  /* Amber */
    --text-color: #333;
    --light-text-color: #fff;
    --background-color: #f3e5f5; /* Very Light Purple Background */
    --card-background: #ffffff;
    --border-color: #e0e0e0;
    --error-color: #f44336;

    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --heading-font-family: 'Georgia', Times, 'Times New Roman', serif;

    --mobile-breakpoint: 768px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: var(--card-background);
    margin: 20px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 800px;
    text-align: center;
}

header {
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-family: var(--heading-font-family);
    color: var(--primary-color);
    margin: 0;
    font-size: 2.5em;
}

header p {
    font-size: 1.2em;
    color: #555;
    margin-top: 10px;
}

main {
    position: relative;
    min-height: 300px;
}

/* --- Landing Page --- */
.quiz-selection h2 {
    font-family: var(--heading-font-family);
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.quiz-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
}

.quiz-card {
    background-color: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    width: 300px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color);
}

.quiz-card h3 {
    font-family: var(--heading-font-family);
    color: var(--primary-color);
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 5px;
}

.quiz-source {
    font-size: 0.9em;
    color: var(--secondary-color);
    font-style: italic;
    margin-bottom: 15px;
}

.quiz-card p {
    font-size: 1em;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.about-section {
    background-color: var(--background-color);
    padding: 25px;
    border-radius: 10px;
    text-align: left;
    margin-top: 20px;
}

.about-section h3 {
    font-family: var(--heading-font-family);
    color: var(--primary-color);
    margin-top: 0;
}

.about-section p {
    font-size: 1em;
    color: #555;
    margin-bottom: 10px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

button {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 160px;
    text-transform: uppercase;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #e0a800;
}

/* --- Quiz Screens --- */
.quiz-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.5s ease-in-out;
}

.quiz-screen.active {
    display: flex;
}

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

.welcome-content {
    text-align: center;
    max-width: 600px;
}

.welcome-content h2 {
    font-family: var(--heading-font-family);
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.welcome-content p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 15px;
    text-align: left;
}

.progress-bar-container {
    width: 100%;
    max-width: 500px;
    background-color: var(--border-color);
    border-radius: 8px;
    margin-bottom: 25px;
    height: 28px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--secondary-color);
    transition: width 0.5s ease-in-out;
    border-radius: 8px;
}

.question-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    font-weight: bold;
    font-size: 0.95em;
    z-index: 1;
}

.quiz-question-text {
    font-size: 1.7em;
    margin-bottom: 30px;
    color: var(--text-color);
    text-align: center;
    font-weight: 500;
}

.answer-options {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.answer-option {
    background-color: var(--card-background);
    border: 2px solid var(--border-color);
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.answer-option:hover {
    background-color: var(--background-color);
    border-color: var(--secondary-color);
}

.answer-option.selected {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    border-color: var(--secondary-color);
    font-weight: bold;
}

.answer-option input[type="radio"] {
    display: none;
}

.answer-option label {
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.answer-option label span {
    display: inline-block;
    margin-right: 15px;
    padding: 6px 12px;
    border-radius: 5px;
    background-color: var(--accent-color);
    color: var(--text-color);
    font-weight: bold;
    min-width: 35px;
    text-align: center;
}

.answer-option.selected label span {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.form-navigation {
    width: 100%;
    display: flex;
    justify-content: space-between;
    max-width: 500px;
    margin-top: 20px;
}

.form-group {
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* --- Results Display --- */
.results-container {
    background-color: var(--background-color);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    width: 100%;
    max-width: 600px;
    text-align: left;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.gift-result {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px dashed var(--border-color);
}

.gift-result:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.gift-result h3 {
    font-family: var(--heading-font-family);
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.7em;
}

.gift-result .score {
    font-size: 1.1em;
    color: #777;
    font-weight: bold;
    margin-bottom: 15px;
    display: block;
}

.gift-result p {
    font-size: 1.05em;
    color: #555;
    margin-bottom: 10px;
}

.gift-result ul {
    list-style: disc;
    margin-left: 25px;
    padding-left: 0;
    color: #666;
    font-size: 1em;
}

.gift-result ul li {
    margin-bottom: 8px;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* --- Footer --- */
footer {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95em;
    color: #777;
    width: 100%;
    text-align: center;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* --- Responsive Design --- */
@media (max-width: var(--mobile-breakpoint)) {
    .container {
        margin: 10px;
        padding: 20px;
    }

    header h1 {
        font-size: 2em;
    }

    header p {
        font-size: 1em;
    }

    .quiz-selection h2 {
        font-size: 1.8em;
    }

    .quiz-card {
        width: 100%;
        max-width: 350px;
    }

    .quiz-options {
        gap: 15px;
    }

    .quiz-question-text {
        font-size: 1.4em;
    }

    .answer-option {
        padding: 12px 15px;
        font-size: 1em;
    }

    .answer-option label span {
        padding: 4px 8px;
        min-width: 30px;
        margin-right: 10px;
    }

    .form-navigation {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    button {
        min-width: 140px;
        font-size: 1em;
        width: 100%;
        max-width: 250px;
    }

    .results-container {
        padding: 20px;
    }

    .gift-result h3 {
        font-size: 1.5em;
    }

    .results-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
}
