:root {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-hover: #1c2129;
    --border: #30363d;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #79b8ff;
    --green: #3fb950;
    --yellow: #d29922;
    --orange: #db6d28;
    --red: #f85149;
    --radius: 8px;
    --container: 1100px;
}

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

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

a:hover {
    text-decoration: underline;
}

/* Hero */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

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

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

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

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

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

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

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--text-muted);
}

/* Quiz */
.quiz-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.quiz-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

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

.quiz-step {
    display: none;
    max-width: 600px;
    margin: 0 auto;
}

.quiz-step.active {
    display: block;
}

.quiz-step h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

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

.quiz-option {
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quiz-option:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}

.quiz-option.selected {
    background: var(--surface-hover);
    border-color: var(--accent);
}

/* Catalog */
.catalog-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.catalog-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.catalog-controls {
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-pill {
    padding: 0.35rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--surface-hover);
    border-color: var(--accent);
    color: var(--text);
}

/* Category groups in catalog */
.category-group {
    margin-bottom: 3rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.category-icon {
    font-size: 1.25rem;
}

.category-label {
    font-size: 1.2rem;
    font-weight: 600;
}

.category-count {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
}

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

/* Vehicle cards */
.vehicle-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.vehicle-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.vehicle-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.vehicle-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vehicle-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-cost {
    background: rgba(63, 185, 80, 0.15);
    color: var(--green);
}

.badge-cost-paid {
    background: rgba(210, 153, 34, 0.15);
    color: var(--yellow);
}

.badge-complexity-very-low,
.badge-complexity-low {
    background: rgba(63, 185, 80, 0.15);
    color: var(--green);
}

.badge-complexity-medium {
    background: rgba(210, 153, 34, 0.15);
    color: var(--yellow);
}

.badge-complexity-high {
    background: rgba(219, 109, 40, 0.15);
    color: var(--orange);
}

.badge-platform {
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 1rem;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    padding: 2rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal .vehicle-full-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.modal .detail-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.modal .detail-label {
    font-weight: 600;
    min-width: 100px;
    color: var(--text);
}

.modal .detail-value {
    color: var(--text-muted);
}

.modal .example-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1.5rem 0;
}

.modal .example-box h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.modal .prompt-section {
    margin-top: 1.5rem;
}

.modal .prompt-section h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.modal .instructions-section {
    margin-top: 1.5rem;
}

.modal .instructions-section h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.instructions-list {
    list-style: none;
    counter-reset: step;
    padding: 0;
}

.instructions-list li {
    counter-increment: step;
    position: relative;
    padding: 0.5rem 0 0.5rem 2.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    border-bottom: 1px solid var(--border);
}

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

.instructions-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-prompt-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.copy-prompt-btn:hover {
    background: var(--accent-hover);
}

.copy-prompt-btn.copied {
    background: var(--green);
}

.prompt-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin-top: 0.75rem;
}

/* Story */
.story-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.story-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.story-content {
    max-width: 680px;
    margin: 0 auto;
}

.story-content p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.story-content a {
    color: var(--accent);
}

.story-signature {
    margin-top: 2rem;
    font-style: italic;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

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

    .modal {
        margin: 1rem;
        padding: 1.5rem;
    }
}
