/* ==========================================
   Gauss Education - CSS Stylesheet
   ========================================== */

/* CSS Custom Properties */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #7c3aed;
    --secondary-light: #ede9fe;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 10px;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-light);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 50%, #f5f0ff 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.floating-math {
    position: absolute;
    inset: 0;
}

.math-symbol {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.08;
    animation: float 8s ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 60px 0;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text);
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================
   Section Styles
   ========================================== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   Features Section
   ========================================== */
.features {
    background: var(--bg);
}

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

.feature-card {
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================
   Practice Section
   ========================================== */
.practice {
    background: var(--bg-secondary);
}

.practice-app {
    max-width: 700px;
    margin: 0 auto;
}

.practice-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 0.95rem;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-option {
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    background: var(--bg);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-option:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.practice-area {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.practice-score, .practice-streak {
    text-align: center;
}

.score-label, .streak-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.score-value, .streak-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.score-separator, .score-total {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 500;
}

.practice-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: 100px;
}

.question-card {
    text-align: center;
    padding: 24px 0;
}

.question-number {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 16px;
}

.question-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-placeholder {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 400;
}

.answer-section {
    display: flex;
    gap: 12px;
    justify-content: center;
    max-width: 360px;
    margin: 0 auto;
}

.answer-input {
    width: 180px;
    padding: 12px 20px;
    font-size: 1.2rem;
    font-family: inherit;
    font-weight: 600;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
    -moz-appearance: textfield;
}

.answer-input::-webkit-outer-spin-button,
.answer-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.answer-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.answer-input:disabled {
    background: var(--bg-tertiary);
    color: var(--text-light);
}

.feedback {
    margin-top: 16px;
    font-size: 1rem;
    font-weight: 600;
    min-height: 32px;
    transition: var(--transition);
}

.feedback.correct {
    color: var(--success);
}

.feedback.wrong {
    color: var(--danger);
}

.practice-actions {
    text-align: center;
    margin-top: 24px;
}

.progress-bar-container {
    margin-top: 24px;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 100px;
    transition: width 0.5s ease;
    width: 0;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -24px;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Results Panel */
.results-panel {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.results-icon {
    color: var(--success);
    margin-bottom: 16px;
}

.results-panel h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 400px;
    margin: 0 auto 32px;
}

.result-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.result-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.result-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

/* ==========================================
   Challenge Section
   ========================================== */
.challenge {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    color: white;
}

.challenge .section-header h2 {
    color: white;
}

.challenge .section-header p {
    color: rgba(255, 255, 255, 0.7);
}

.challenge-app {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.challenge-display {
    margin-bottom: 32px;
}

.challenge-timer-ring {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 32px;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 6;
}

.timer-progress {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.challenge-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

.challenge-question {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.challenge-question .question-placeholder {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.5);
}

.challenge-input-area {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.challenge-input-area .answer-input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.challenge-input-area .answer-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.challenge-input-area .answer-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.challenge-input-area .answer-input:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
}

.challenge-score-display {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

.challenge-score-display strong {
    font-size: 1.3rem;
    color: var(--accent);
}

.challenge .btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text);
}

.challenge .btn-primary:hover:not(:disabled) {
    background: #d97706;
    border-color: #d97706;
}

.challenge-result {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 32px;
    backdrop-filter: blur(10px);
}

.challenge-result h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.challenge-result p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

.challenge-result strong {
    color: var(--accent);
    font-size: 1.5rem;
}

/* ==========================================
   Formula Section
   ========================================== */
.formulas {
    background: var(--bg-secondary);
}

.formula-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.formula-tab {
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--bg);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
}

.formula-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.formula-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.formula-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.formula-grid.active {
    display: grid;
}

.formula-card {
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.formula-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.formula-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.formula {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    padding: 12px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    text-align: center;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
}

.formula-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
}

/* ==========================================
   Resources Section
   ========================================== */
.resources {
    background: var(--bg);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.resource-card {
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

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

.resource-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--secondary-light);
    color: var(--secondary);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.resource-icon svg {
    width: 28px;
    height: 28px;
}

.resource-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.resource-card h3 a {
    color: var(--text);
}

.resource-card h3 a:hover {
    color: var(--primary);
}

.resource-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.resource-list {
    list-style: none;
}

.resource-list li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.resource-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* ==========================================
   SEO Section
   ========================================== */
.seo-section {
    background: var(--bg-secondary);
    padding: 64px 0;
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
    text-align: center;
}

.seo-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.seo-content a {
    color: var(--primary);
    font-weight: 500;
}

.seo-content a:hover {
    text-decoration: underline;
}

.seo-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.seo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.seo-table caption {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 12px;
    text-align: left;
    caption-side: top;
}

.seo-table thead {
    background: var(--primary);
    color: white;
}

.seo-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.seo-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.6;
}

.seo-table tbody tr:last-child td {
    border-bottom: none;
}

.seo-table tbody tr:hover {
    background: var(--primary-light);
}

.seo-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.seo-list li {
    padding: 10px 0 10px 24px;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    border-bottom: 1px solid var(--border);
}

.seo-list li:last-child {
    border-bottom: none;
}

.seo-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.seo-list li strong {
    color: var(--text);
}

@media (max-width: 768px) {
    .seo-table {
        font-size: 0.85rem;
    }

    .seo-table th,
    .seo-table td {
        padding: 10px 12px;
    }
}

/* ==========================================
   Contextual Intro Section
   ========================================== */
.contextual-intro {
    background: var(--bg);
    padding: 64px 0;
    border-bottom: 1px solid var(--border);
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
}

.intro-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    text-align: center;
}

.intro-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.intro-content a {
    color: var(--primary);
    font-weight: 500;
}

.intro-content a:hover {
    text-decoration: underline;
}

/* ==========================================
   FAQ Section
   ========================================== */
.faq-section {
    background: var(--bg);
    padding: 80px 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-light);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    gap: 16px;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.faq-question[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-answer.open {
    max-height: 600px;
}

.faq-answer p {
    padding: 0 24px 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.faq-answer a {
    color: var(--primary);
    font-weight: 500;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* ==========================================
   Latest Articles Section
   ========================================== */
.latest-articles {
    background: var(--bg-secondary);
    padding: 80px 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.article-card {
    display: block;
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    color: var(--text);
}

.article-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 100px;
    margin-bottom: 16px;
}

.article-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.5;
}

.article-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.article-date {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.articles-cta {
    text-align: center;
}

/* ==========================================
   Breadcrumbs
   ========================================== */
.breadcrumbs {
    padding: 16px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.breadcrumb-list a {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-light);
}

/* ==========================================
   Blog Page Styles
   ========================================== */
.blog-header {
    text-align: center;
    padding: 120px 0 48px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 50%, #f5f0ff 100%);
}

.blog-header h1 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
}

.blog-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    padding: 48px 0;
}

/* Blog Post Page Styles */
.post-header {
    padding: 120px 0 32px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 50%, #f5f0ff 100%);
    text-align: center;
}

.post-header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--text);
    max-width: 800px;
    margin: 0 auto 16px;
    line-height: 1.4;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.post-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.post-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.post-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 16px;
}

.post-content ul, .post-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.post-content li {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 8px;
}

.post-content a {
    color: var(--primary);
    font-weight: 500;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content strong {
    color: var(--text);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.post-content th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--primary);
    color: white;
}

.post-content td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.post-cta {
    margin-top: 48px;
    padding: 32px;
    background: var(--primary-light);
    border-radius: var(--radius);
    text-align: center;
}

.post-cta p {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 16px;
}

/* Legal Page Styles */
.legal-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.legal-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-content ul {
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-content li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 6px;
}

.footer-legal {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

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

    .faq-question {
        font-size: 0.9rem;
        padding: 16px 20px;
    }

    .faq-answer p {
        padding: 0 20px 16px;
        font-size: 0.9rem;
    }
}

/* ==========================================
   Contact Section
   ========================================== */
.contact {
    background: var(--bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    text-align: center;
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    margin-bottom: 16px;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.contact-card a {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 500;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 0 24px;
}

.footer-content {
    text-align: center;
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-brand .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

.footer-brand .logo-text {
    color: white;
    font-size: 1.05rem;
}

.footer-desc {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   Animations
   ========================================== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.3s ease-in-out;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        padding: 12px 16px;
    }

    section {
        padding: 60px 0;
    }

    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 40px;
    }

    .hero-stats {
        gap: 32px;
    }

    .stat-number {
        font-size: 2rem;
    }

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

    .practice-header {
        flex-direction: column;
        gap: 12px;
    }

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

    .answer-section {
        flex-direction: column;
        align-items: center;
    }

    .answer-input {
        width: 100%;
        max-width: 240px;
    }

    .challenge-question {
        font-size: 2rem;
    }

    .challenge-input-area {
        flex-direction: column;
        align-items: center;
    }

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

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

    .results-stats {
        grid-template-columns: 1fr;
    }

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

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

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

    .btn-group {
        justify-content: center;
    }

    .btn-option {
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .formula-tabs {
        gap: 6px;
    }

    .formula-tab {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}
