/* ================================
   CSS Custom Properties
   ================================ */
:root {
    /* Backgrounds */
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f6f8fa;
    --color-bg-tertiary: #f0f2f5;
    --color-bg-elevated: #ffffff;
    --color-bg-nav: #f4f7fa;
    --color-bg-code: #f6f8fa;

    /* Text */
    --color-text-primary: #1f2328;
    --color-text-secondary: #656d76;
    --color-text-muted: #8b949e;
    --color-text-inverse: #ffffff;

    /* Accent (Coral/Orange) */
    --color-accent: #ff6b4a;
    --color-accent-hover: #e55a3a;
    --color-accent-light: #fff4f1;
    --color-accent-muted: rgba(255, 107, 74, 0.1);

    /* Borders */
    --color-border: #d0d7de;
    --color-border-muted: #e1e4e8;
    --color-border-accent: #ff6b4a;

    /* Semantic */
    --color-success: #1a7f37;
    --color-success-light: #dafbe1;
    --color-warning: #9a6700;
    --color-warning-light: #fff8c5;
    --color-error: #cf222e;
    --color-error-light: #ffebe9;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(31, 35, 40, 0.06);
    --shadow-md: 0 3px 6px rgba(31, 35, 40, 0.1);
    --shadow-lg: 0 8px 24px rgba(31, 35, 40, 0.12);
    --shadow-elevated: 0 12px 28px rgba(31, 35, 40, 0.15);

    /* Special */
    --color-stars: #e3b341;
    --skeleton-base: #e1e4e8;
    --skeleton-shine: #f6f8fa;
}

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

/* Offset anchor scroll for sticky nav */
[id] {
    scroll-margin-top: 70px;
}

/* Base */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-secondary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Debug Badge */
.debug-badge {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    z-index: 9999;
    box-shadow: var(--shadow-md);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background-color: var(--color-bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-border-accent);
}

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

.category-card .test-count {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Intro Section */
.intro {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.intro h1 {
    margin-bottom: 0.5rem;
}

.intro .tagline {
    color: var(--color-text-muted);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* SEO Marker - Hidden from visual display */
.seo-marker {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Utility Classes */
.text-muted {
    color: var(--color-text-muted);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ================================
   Navigation
   ================================ */
.main-nav {
    background-color: var(--color-bg-nav);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.logo-accent {
    color: var(--color-accent);
}

.nav-logo:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--color-text-primary);
    text-decoration: none;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.nav-dropdown-btn:hover {
    color: var(--color-text-primary);
    border-color: var(--color-accent);
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-elevated);
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.nav-dropdown-content a:hover {
    background-color: var(--color-accent-light);
    color: var(--color-accent);
    text-decoration: none;
}

/* ================================
   Page Header & Breadcrumbs
   ================================ */
.page-header {
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumbs ol {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--color-text-muted);
}

.breadcrumbs a {
    color: var(--color-text-muted);
}

.breadcrumbs a:hover {
    color: var(--color-accent);
}

.breadcrumbs span {
    color: var(--color-text-primary);
}

/* ================================
   Footer
   ================================ */
.site-footer {
    background-color: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-tagline {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.footer-edge-comet {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-brand {
    max-width: 550px;
}

.footer-mission {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.footer-links-group {
    display: flex;
    gap: 3rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-column h4 {
    color: var(--color-text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.footer-column a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-bottom p {
    margin-bottom: 0;
}

/* ================================
   Homepage
   ================================ */
.home-page {
    max-width: 1000px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

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

.hero .tagline {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* About Section */
.home-page .intro {
    background-color: var(--color-bg-secondary);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--color-border);
}

.home-page .intro h2 {
    margin-bottom: 1rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.feature {
    background-color: var(--color-bg-tertiary);
    padding: 1rem;
    border-radius: 4px;
}

.feature strong {
    display: block;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}

.feature span {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* How It Works */
.how-it-works {
    margin-bottom: 3rem;
}

.how-it-works h2 {
    margin-bottom: 1.5rem;
}

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

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    margin-bottom: 0.25rem;
}

.step-content p {
    color: var(--color-text-secondary);
    margin-bottom: 0;
}

/* Test Index */
.test-index {
    margin-bottom: 3rem;
}

.test-index > h2 {
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.category-section {
    margin-bottom: 2rem;
    background-color: var(--color-bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
}

.category-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border-muted);
}

.category-header h3 {
    margin-bottom: 0.25rem;
}

.category-header .category-description {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.test-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.test-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--color-bg-tertiary);
    border-radius: 4px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid var(--color-border-muted);
}

.test-card:hover {
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
    text-decoration: none;
    border-color: var(--color-accent);
}

.test-param {
    background-color: rgba(0, 0, 0, 0.06);
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* Quick Start */
.quick-start {
    background-color: var(--color-bg-secondary);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
}

.quick-start h2 {
    margin-bottom: 0.5rem;
}

.quick-start > p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-link {
    display: block;
    padding: 1rem;
    background-color: var(--color-bg-primary);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--color-border);
}

.quick-link:hover {
    border-color: var(--color-accent);
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.quick-link strong {
    display: block;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.quick-link span {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Warning box */
.warning {
    background-color: var(--color-error-light);
    border-left: 3px solid var(--color-error);
    padding: 1rem;
    border-radius: 0 4px 4px 0;
}

/* Log Analyzer Link */
.log-analyzer-link:hover {
    color: var(--color-accent-hover);
}

/* Test Info Lists */
.test-info ol {
    margin: 0.5rem 0 0 0;
    padding: 0 0 0 1.5rem;
}

.test-info ol li {
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}
