/* tsuku.dev - Minimal dark theme */

:root {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --border: #30363d;
    --code-bg: #1c2128;
}

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

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.github-link {
    color: var(--text-muted);
    transition: color 0.2s;
}

.github-link:hover {
    color: var(--text);
}

/* Main */
main {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

main.wide {
    max-width: 1200px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 0;
}

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

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

.install-box {
    display: inline-flex;
    align-items: center;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    gap: 1rem;
}

.install-box code {
    font-family: "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.95rem;
    color: var(--accent);
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: var(--text);
}

.copy-btn.copied {
    color: #3fb950;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

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

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

.feature code {
    font-family: "SF Mono", Consolas, monospace;
    font-size: 0.85rem;
    background: var(--code-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.feature-link {
    margin-top: 0.75rem;
}

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

.feature-link a:visited {
    color: #6e7681;
}

.feature-link a:hover {
    text-decoration: underline;
}

/* Quick Start */
.quickstart {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.quickstart h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow-x: auto;
}

.code-block pre {
    padding: 1.5rem;
    font-family: "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block .prompt {
    color: var(--accent);
    user-select: none;
}

.code-block .output {
    color: var(--text-muted);
}

/* Links */
.links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 0;
    flex-wrap: wrap;
}

.link-btn {
    color: var(--accent);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s, background 0.2s;
}

.link-btn:hover {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.1);
}

/* Content sections (placeholder pages) */
.content, .placeholder {
    padding: 2rem 0;
    text-align: center;
}

.content h2, .placeholder h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.content p, .placeholder p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.content ul {
    list-style: none;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.content ul li {
    padding: 0.25rem 0;
}

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

/* Recipe Browser */
.recipe-browser {
    padding: 0 0 2rem;
}

.search-container {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.recipe-search {
    width: 100%;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.recipe-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.recipe-count {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Recipe Card */
.recipe-card {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

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

.recipe-name {
    font-family: "SF Mono", Consolas, monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.recipe-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.recipe-homepage {
    color: var(--accent);
    font-size: 0.8rem;
    text-decoration: none;
}

.recipe-homepage:hover {
    text-decoration: underline;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.no-results p {
    margin-bottom: 0.5rem;
}

/* Error State */
.error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.error-state p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.error-state button {
    margin-bottom: 1rem;
    cursor: pointer;
}

.error-fallback {
    font-size: 0.85rem;
}

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

.error-fallback a:hover {
    text-decoration: underline;
}

/* Noscript Message */
.noscript-message {
    text-align: center;
    padding: 2rem;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
}

.noscript-message p {
    margin-bottom: 0.5rem;
}

.noscript-message p:last-child {
    margin-bottom: 0;
}

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

.noscript-message a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

footer a:hover {
    color: var(--text);
}

footer .sep {
    margin: 0 0.5rem;
}

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

    .tagline {
        font-size: 1rem;
    }

    .install-box {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .install-box code {
        font-size: 0.85rem;
    }

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

    .code-block pre {
        font-size: 0.8rem;
        padding: 1rem;
    }

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

    .link-btn {
        width: 100%;
        text-align: center;
    }

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

    .recipe-search {
        font-size: 0.9rem;
    }

    .recipe-card {
        padding: 1rem;
    }
}
