:root {
    --bg: #242424;
    --surface: #2e2e2e;
    --text: #e7e9ee;
    --muted: #9aa0ac;
    --accent: #F6AD65;
    --border: #3a3a3a;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

main {
    width: 100%;
    max-width: 640px;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--muted);
    font-size: 1.1rem;
}

section {
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

p {
    margin-bottom: 0.75rem;
}

code {
    font-family: "SF Mono", Menlo, Monaco, "Courier New", monospace;
    background: var(--surface);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 0.75rem;
}

pre code {
    background: none;
    padding: 0;
}

.demo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.controls input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-width: 220px;
}

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

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

button {
    background: var(--accent);
    color: #242424;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.result {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.result img {
    max-width: 100%;
    max-height: 360px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.result a {
    color: var(--accent);
    word-break: break-all;
    font-size: 0.85rem;
}

footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

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

footer a:hover {
    text-decoration: underline;
}
