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

:root {
    --bg: #0a0a0f;
    --surface: #13131c;
    --surface2: #1a1a28;
    --border: #2a2a40;
    --accent: #7c6af7;
    --accent2: #a78bfa;
    --text: #e2e2f0;
    --muted: #888899;
    --get: #22c55e;
    --post: #f59e0b;
    --radius: 12px;
}

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

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

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

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; }
.logo-icon { color: var(--accent2); font-size: 1.3rem; }

nav { display: flex; gap: 1.5rem; }
nav a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
nav a:hover { color: var(--text); }

.hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; margin-bottom: 1.2rem; }
.hero p { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; max-width: 480px; }

.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); color: #fff; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent2); color: var(--accent2); }
.btn-outline { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent2); color: var(--accent2); }

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.orbit-ring {
    position: relative;
    width: 260px;
    height: 260px;
    border: 2px dashed var(--border);
    border-radius: 50%;
    animation: spin 20s linear infinite;
}

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

.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--accent2);
    animation: spin 20s linear infinite reverse;
}

.orbit-dot {
    position: absolute;
    width: 32px;
    height: 32px;
    background: var(--surface2);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent2);
    animation: spin 20s linear infinite reverse;
}

.dot-1 { top: -16px; left: calc(50% - 16px); }
.dot-2 { top: calc(30% - 16px); right: -16px; }
.dot-3 { bottom: calc(20% - 16px); right: 0; }
.dot-4 { bottom: -16px; left: calc(50% - 16px); }
.dot-5 { top: calc(30% - 16px); left: -16px; }

section { padding: 5rem 2rem; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.section-header p { color: var(--muted); }

.agents-section { background: var(--surface); }

.agents-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.agent-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

.agent-card:hover { border-color: var(--accent2); transform: translateY(-2px); }
.agent-card.loading { color: var(--muted); font-style: italic; }

.agent-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.agent-name { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.agent-domain { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--get);
    background: rgba(34,197,94,0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.status-badge::before { content: ''; width: 6px; height: 6px; background: var(--get); border-radius: 50%; }

.joke-section { max-width: 800px; margin: 0 auto; }

.joke-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.joke-search {
    display: flex;
    gap: 0.75rem;
    max-width: 480px;
    margin: 0 auto 2rem;
}

.joke-search input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.joke-search input:focus { border-color: var(--accent2); }

.joke-display {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    transition: border-color 0.3s;
}

.joke-display.loaded { border-color: var(--accent); }
.joke-placeholder { color: var(--muted); font-style: italic; }
.joke-text { font-size: 1.05rem; line-height: 1.7; }
.joke-text strong { color: var(--accent2); }
.joke-text em { color: var(--muted); }
.joke-source { margin-top: 1rem; font-size: 0.75rem; color: var(--muted); }
.joke-loading { color: var(--accent2); }
.joke-error { color: #f87171; }

.api-section { background: var(--surface); }

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

.api-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
}

.api-card code {
    display: block;
    font-size: 0.8rem;
    color: var(--accent2);
    background: var(--surface2);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    word-break: break-all;
}

.api-card p { font-size: 0.85rem; color: var(--muted); }

.method {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.get { background: rgba(34,197,94,0.15); color: var(--get); }
.post { background: rgba(245,158,11,0.15); color: var(--post); }

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

footer p + p { margin-top: 0.4rem; }

@media (max-width: 700px) {
    .hero { grid-template-columns: 1fr; padding: 3rem 1.5rem 2rem; }
    .hero-visual { display: none; }
    nav { display: none; }
}
