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

:root {
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;
    --blue-400: #60a5fa;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --green-600: #16a34a;
    --green-100: #dcfce7;
    --red-600: #dc2626;
    --red-100: #fee2e2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--white);
    color: var(--gray-900);
    line-height: 1.5;
}

h1 {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.5;
}

h2 {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.5;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.5;
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
}

p {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

/* Header Styles */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    z-index: 50;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.icon-brain {
    width: 32px;
    height: 32px;
    color: var(--blue-600);
}

.logo span {
    font-size: 1.25rem;
    color: var(--blue-600);
    font-weight: 500;
}

nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--gray-600);
    transition: color 0.3s;
    font-weight: 400;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue-600);
}

/* Main Content */
#app {
    flex-grow: 1;
    padding-top: 64px;
    min-height: calc(100vh - 64px);
}

/* Footer Styles */
#footer {
    background-color: var(--gray-800);
    color: var(--white);
    padding: 3rem 1rem 1.5rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p {
    color: var(--gray-200);
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--gray-200);
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-200);
}

/* Home Page Styles */
.hero-section {
    background: linear-gradient(to bottom right, var(--blue-600), var(--blue-800));
    color: var(--white);
    padding: 5rem 1rem;
    text-align: center;
}

.hero-content {
    max-width: 896px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 3.75rem;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.5rem;
    color: var(--blue-100);
    margin-bottom: 2rem;
}

.categories-section {
    padding: 4rem 1rem;
    background-color: var(--gray-50);
}

.categories-container {
    max-width: 1280px;
    margin: 0 auto;
}

.categories-header {
    text-align: center;
    margin-bottom: 3rem;
}

.categories-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.categories-header p {
    font-size: 1.25rem;
    color: var(--gray-600);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.category-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    transform: translateY(-4px);
    border-color: var(--blue-400);
}

.category-icon {
    width: 48px;
    height: 48px;
    background-color: var(--blue-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.category-icon svg {
    width: 24px;
    height: 24px;
    color: var(--blue-600);
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.features-section {
    padding: 4rem 1rem;
}

.features-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.feature-item {
    padding: 1.5rem;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background-color: var(--blue-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: var(--blue-600);
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--gray-600);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--blue-600);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--blue-700);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--blue-600);
}

.btn-secondary:hover {
    background-color: var(--blue-50);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* Quiz Page Styles */
.quiz-container {
    max-width: 896px;
    margin: 0 auto;
    padding: 5rem 1rem;
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.quiz-header p {
    color: var(--gray-600);
}

.quiz-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--blue-600);
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--gray-600);
}

.quiz-card {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.quiz-question {
    margin-bottom: 2rem;
}

.question-number {
    color: var(--blue-600);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    padding: 1rem 1.5rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    background-color: var(--white);
    text-align: left;
    transition: all 0.3s;
    width: 100%;
    font-size: 1rem;
}

.quiz-option:hover:not(:disabled) {
    border-color: var(--blue-400);
    background-color: var(--blue-50);
}

.quiz-option.selected {
    border-color: var(--blue-600);
    background-color: var(--blue-100);
}

.quiz-option.correct {
    border-color: var(--green-600);
    background-color: var(--green-100);
}

.quiz-option.incorrect {
    border-color: var(--red-600);
    background-color: var(--red-100);
}

.quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-navigation {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* Quiz Results */
.results-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 5rem 1rem;
    text-align: center;
}

.results-card {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.results-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 2rem;
}

.results-icon svg {
    width: 100%;
    height: 100%;
}

.results-card h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.results-score {
    font-size: 3rem;
    color: var(--blue-600);
    font-weight: 500;
    margin: 1.5rem 0;
}

.results-message {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 320px;
    margin: 0 auto;
}

/* Static Pages */
.page-container {
    max-width: 896px;
    margin: 0 auto;
    padding: 5rem 1rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: var(--gray-600);
}

.page-content {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 2rem;
}

.page-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content h2:first-child {
    margin-top: 0;
}

.page-content p {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.page-content ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.page-content li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

/* Contact Form */
.contact-form {
    max-width: 640px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--blue-600);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--green-600);
}

.toast.error {
    border-left: 4px solid var(--red-600);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        gap: 1rem;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section p {
        font-size: 1.25rem;
    }

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

    .page-header h1 {
        font-size: 2rem;
    }

    .results-card {
        padding: 2rem 1rem;
    }

    #toast-container {
        left: 1rem;
        right: 1rem;
    }

    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 0.5rem;
    }

    nav {
        gap: 0.75rem;
        font-size: 0.875rem;
    }

    .logo span {
        font-size: 1rem;
    }

    .icon-brain {
        width: 24px;
        height: 24px;
    }
}
