* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #f59e0b;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
}

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

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

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

ul {
    list-style: none;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e3a5f 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-secondary:hover {
    background: var(--bg-light);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Features */
.features {
    padding: 80px 0;
    background: var(--white);
}

.features h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 50px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    background: var(--bg-light);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-light);
}

/* Popular Tests */
.popular-tests, .latest-articles {
    padding: 80px 0;
}

.popular-tests h2, .latest-articles h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 50px;
}

.test-grid, .article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.test-card, .article-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
    display: block;
}

.test-card:hover, .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.test-icon, .article-category {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-category {
    color: var(--primary);
    font-weight: 600;
}

.test-card h3, .article-card h3 {
    font-size: 1.25rem;
    margin: 15px 0 10px;
}

.test-card p, .article-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.test-level {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.75rem;
    margin-top: 15px;
    color: var(--secondary);
}

.read-time {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 15px;
    display: block;
}

.view-all {
    text-align: center;
    margin-top: 40px;
}

/* Stats */
.stats {
    padding: 60px 0;
    background: var(--bg-dark);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    color: #94a3b8;
    font-size: 1rem;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.footer-section p {
    color: #94a3b8;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #94a3b8;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Page Header */
.page-header {
    background: var(--bg-dark);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    color: #94a3b8;
}

/* Test Page */
.test-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 0 20px;
}

.quiz-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.quiz-question {
    font-size: 1.25rem;
    margin-bottom: 30px;
    font-weight: 600;
}

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

.quiz-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

.quiz-option input {
    margin-right: 15px;
}

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

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

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.quiz-progress {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-light);
}

/* Article Page */
.article-content {
    max-width: 800px;
    margin: 50px auto;
    padding: 0 20px;
}

.article-body {
    background: var(--white);
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.article-body h2 {
    margin: 30px 0 15px;
    font-size: 1.75rem;
}

.article-body h3 {
    margin: 25px 0 15px;
    font-size: 1.35rem;
}

.article-body p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-body ul, .article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body code {
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.article-body pre {
    background: var(--bg-dark);
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 50px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-body {
        padding: 25px;
    }
}

/* 404 Page */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-content h1 {
    font-size: 8rem;
    color: var(--primary);
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.error-content p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 40px; }
.mb-4 { margin-bottom: 40px; }
