/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #0891b2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Tab Navigation */
.tab-navigation {
    background: var(--bg-white);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.tab-navigation .container {
    display: flex;
    gap: 0;
}

.tab-btn {
    flex: 1;
    padding: 16px 32px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--bg-light);
}

/* Main Content */
main {
    padding: 40px 20px;
    min-height: calc(100vh - 300px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

/* Learn Section */
.intro {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
}

.intro h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.intro p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Models Grid */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.model-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.model-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.model-icon {
    font-size: 2rem;
}

.model-content {
    padding: 24px;
}

.model-description {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 500;
    line-height: 1.6;
}

.model-details h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
    margin-top: 16px;
    font-size: 1rem;
}

.model-details ul {
    list-style: none;
    margin-bottom: 16px;
}

.model-details li {
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-secondary);
}

.model-details li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.examples {
    background: var(--bg-light);
    padding: 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-left: 3px solid var(--secondary-color);
}

/* Quiz Section */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-container h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.quiz-intro {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

#quiz-questions {
    margin-bottom: 30px;
}

.question-card {
    background: var(--bg-white);
    padding: 28px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.question-card:hover {
    box-shadow: var(--shadow-lg);
}

.question-card h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.question-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 500;
    line-height: 1.6;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    background: #eff6ff;
    border-color: var(--primary-color);
}

.option input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.option span {
    font-size: 1rem;
    color: var(--text-primary);
}

.option.correct {
    background: #d1fae5;
    border-color: var(--success-color);
}

.option.incorrect {
    background: #fee2e2;
    border-color: var(--danger-color);
}

/* Buttons */
.submit-btn, .retake-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: block;
    margin: 0 auto;
}

.submit-btn:hover, .retake-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:active, .retake-btn:active {
    transform: translateY(0);
}

/* Quiz Results */
.quiz-results {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-top: 30px;
    border: 2px solid var(--border-color);
}

.quiz-results.hidden {
    display: none;
}

.quiz-results h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.score-display {
    font-size: 4rem;
    font-weight: 700;
    margin: 20px 0;
    color: var(--primary-color);
}

.score-number {
    color: var(--primary-color);
}

.score-total {
    color: var(--text-secondary);
    font-size: 2.5rem;
}

.score-message {
    font-size: 1.3rem;
    margin: 20px 0;
    color: var(--text-secondary);
}

.score-message.excellent {
    color: var(--success-color);
}

.score-message.good {
    color: var(--secondary-color);
}

.score-message.needs-improvement {
    color: var(--warning-color);
}

.retake-btn {
    margin-top: 20px;
}

/* Survey Section */
.survey-container {
    max-width: 900px;
    margin: 0 auto;
}

.survey-container h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.survey-intro {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

.survey-question {
    background: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.survey-question h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.survey-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.survey-option {
    display: flex;
    align-items: flex-start;
    padding: 18px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.survey-option:hover {
    background: #eff6ff;
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.survey-option input[type="radio"] {
    margin-right: 14px;
    margin-top: 4px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.option-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.option-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
}

.survey-option input[type="radio"]:checked + .option-content .option-title {
    color: var(--primary-color);
}

/* Survey Results */
.survey-results {
    margin-top: 40px;
}

.survey-results.hidden {
    display: none;
}

.recommendation-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--primary-color);
}

.recommendation-card h3 {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.recommended-model {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    color: white;
}

.rec-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
}

.recommended-model h2 {
    font-size: 2.2rem;
    margin: 0;
}

.rec-description {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.rec-details, .rec-next-steps, .rec-examples {
    margin-bottom: 30px;
}

.rec-details h4, .rec-next-steps h4, .rec-examples h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.rec-details ul, .rec-next-steps ul {
    list-style: none;
    padding-left: 0;
}

.rec-details li, .rec-next-steps li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.rec-details li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.rec-next-steps li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.rec-examples-text {
    background: var(--bg-light);
    padding: 14px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 1rem;
    border-left: 3px solid var(--secondary-color);
}

#retake-survey {
    margin-top: 30px;
}

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 24px 20px;
    margin-top: 60px;
}

footer p {
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .intro {
        padding: 20px;
    }

    .model-content {
        padding: 20px;
    }

    .question-card {
        padding: 20px;
    }

    .score-display {
        font-size: 3rem;
    }

    .survey-question {
        padding: 20px;
    }

    .survey-option {
        padding: 14px;
    }

    .recommendation-card {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .quiz-results {
        padding: 24px;
    }

    .submit-btn, .retake-btn {
        width: 100%;
    }
}
