/* ── Reset & Base ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: #0a0a0b; color: #e4e4e7; line-height: 1.6; }
a { color: #a78bfa; text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #c4b5fd; }
code, pre { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
pre { white-space: pre-wrap; word-break: break-all; }

/* ── Layout ──────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.app { min-height: 100vh; display: flex; flex-direction: column; }
.muted { color: #71717a; font-size: 0.85rem; }
.accent { color: #a78bfa; }

/* ── Buttons ─────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 1.2rem; border-radius: 8px;
    font-size: 0.9rem; font-weight: 500; cursor: pointer;
    border: 1px solid transparent; transition: all 0.15s;
    font-family: inherit;
}
.btn { text-decoration: none; }
.btn-primary { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.btn-primary:hover { background: #6d28d9; }
.btn-outline { background: transparent; color: #a78bfa; border-color: #3f3f46; }
.btn-outline:hover { border-color: #a78bfa; background: rgba(167,139,250,0.08); }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; border-radius: 6px; }
.btn-xs { padding: 0.15rem 0.5rem; font-size: 0.72rem; border-radius: 4px; background: #27272a; color: #a1a1aa; border: 1px solid #3f3f46; }
.btn-xs:hover { background: #3f3f46; }
.btn-danger { color: #f87171; }
.btn-danger:hover { background: rgba(248,113,113,0.12); }

/* ── Hero ────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 5rem 0 4rem;
    background: radial-gradient(ellipse at 50% 0%, rgba(124,58,237,0.15) 0%, transparent 70%);
}
.hero-title { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.hero-subtitle { font-size: 1.15rem; color: #a1a1aa; max-width: 520px; margin: 0 auto 2.5rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-actions form { display: inline; }

/* ── Features ────────────────────────────────── */
.features { padding: 4rem 0; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.feature-card {
    background: #18181b; border: 1px solid #27272a; border-radius: 12px;
    padding: 2rem; transition: border-color 0.2s;
}
.feature-card:hover { border-color: #3f3f46; }
.feature-icon { color: #a78bfa; margin-bottom: 1rem; }
.feature-card h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { color: #a1a1aa; font-size: 0.9rem; line-height: 1.6; }

/* ── How It Works ────────────────────────────── */
.how-it-works { padding: 3rem 0 5rem; }
.how-it-works h2 { text-align: center; font-size: 1.8rem; font-weight: 700; margin-bottom: 2.5rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step { text-align: center; }
.step-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: #7c3aed; color: #fff; font-weight: 700; font-size: 1.1rem;
    margin-bottom: 1rem;
}
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.step p { color: #a1a1aa; font-size: 0.88rem; }

/* ── Footer ──────────────────────────────────── */
.footer { padding: 2rem 0; text-align: center; color: #a1a1aa; font-size: 0.85rem; border-top: 1px solid #1e1e21; margin-top: auto; }
.footer a { color: #c4b5fd; }

/* ── Bin Page ────────────────────────────────── */
.bin-header { padding: 1.5rem 0; border-bottom: 1px solid #27272a; background: #111113; }
.bin-header-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.brand-link { font-weight: 700; font-size: 1.1rem; color: #e4e4e7; text-decoration: none; }
.badge { padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-active { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-expired { background: rgba(248,113,113,0.15); color: #f87171; }

.bin-url-bar {
    display: flex; align-items: center; gap: 0.6rem;
    background: #18181b; border: 1px solid #27272a; border-radius: 8px;
    padding: 0.5rem 0.8rem; margin-bottom: 0.75rem;
}
.bin-url-bar code { flex: 1; font-size: 0.88rem; color: #a78bfa; user-select: all; }
.bin-meta { display: flex; gap: 1.5rem; font-size: 0.8rem; color: #71717a; flex-wrap: wrap; }

.bin-content { padding: 1.5rem 0; flex: 1; }
.bin-layout { display: grid; grid-template-columns: 340px 1fr; gap: 1.5rem; min-height: 500px; }

/* ── Request List ────────────────────────────── */
.request-list {
    background: #18181b; border: 1px solid #27272a; border-radius: 10px;
    overflow-y: auto; max-height: 70vh;
}
.request-item {
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
    padding: 0.65rem 0.8rem; border-bottom: 1px solid #1e1e21;
    cursor: pointer; transition: background 0.1s;
    font-size: 0.82rem;
}
.request-item:hover { background: #1f1f23; }
.request-item.active { background: #27272a; }
.request-item:last-child { border-bottom: none; }

.method-badge {
    display: inline-block; padding: 0.12rem 0.45rem; border-radius: 4px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    min-width: 52px; text-align: center;
}
.method-get { background: rgba(34,197,94,0.15); color: #4ade80; }
.method-post { background: rgba(59,130,246,0.15); color: #60a5fa; }
.method-put { background: rgba(251,191,36,0.15); color: #fbbf24; }
.method-patch { background: rgba(251,191,36,0.15); color: #fbbf24; }
.method-delete { background: rgba(248,113,113,0.15); color: #f87171; }
.method-head { background: rgba(167,139,250,0.15); color: #a78bfa; }
.method-options { background: rgba(167,139,250,0.15); color: #a78bfa; }

.request-time { color: #a1a1aa; }
.request-ip { font-size: 0.75rem; }
.request-ct { font-size: 0.75rem; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.request-item.new { animation: slideIn 0.3s ease; }

/* ── Request Detail ──────────────────────────── */
.request-detail {
    background: #18181b; border: 1px solid #27272a; border-radius: 10px;
    padding: 1.2rem; overflow-y: auto; max-height: 70vh;
}
.detail-tabs { display: flex; gap: 0; border-bottom: 1px solid #27272a; margin-bottom: 1rem; }
.detail-tab {
    padding: 0.5rem 1rem; font-size: 0.82rem; font-weight: 500;
    cursor: pointer; border-bottom: 2px solid transparent;
    color: #71717a; transition: all 0.15s; background: none; border-top: none; border-left: none; border-right: none;
    font-family: inherit;
}
.detail-tab:hover { color: #e4e4e7; }
.detail-tab.active { color: #a78bfa; border-bottom-color: #a78bfa; }
.detail-section { display: none; }
.detail-section.active { display: block; }
.detail-section pre {
    background: #0f0f11; border: 1px solid #27272a; border-radius: 8px;
    padding: 1rem; font-size: 0.82rem; line-height: 1.6; overflow-x: auto;
    color: #d4d4d8;
}
.detail-meta { display: flex; gap: 1rem; margin-bottom: 1rem; font-size: 0.82rem; color: #a1a1aa; flex-wrap: wrap; }

/* ── Empty State ─────────────────────────────── */
.empty-state { padding: 3rem 1.5rem; text-align: center; color: #71717a; }
.empty-state p:first-child { font-size: 1rem; margin-bottom: 0.4rem; color: #a1a1aa; }

/* ── Send Page ───────────────────────────────── */
.send-header { padding: 2rem 0 1.5rem; border-bottom: 1px solid #27272a; background: #111113; }
.send-header h1 { font-size: 1.6rem; font-weight: 700; margin-top: 1rem; }
.send-page .container { padding-top: 1.5rem; padding-bottom: 3rem; }

.send-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.form-row { display: flex; gap: 0.8rem; }
.form-group { margin-bottom: 1rem; }
.form-group-method { flex: 0 0 140px; }
.form-group-url { flex: 1; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 500; color: #a1a1aa; margin-bottom: 0.3rem; }

input, select, textarea {
    width: 100%; padding: 0.55rem 0.8rem; font-size: 0.88rem;
    background: #18181b; border: 1px solid #27272a; border-radius: 8px;
    color: #e4e4e7; font-family: inherit; transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #7c3aed; }
textarea { resize: vertical; font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.82rem; }

.header-row { display: flex; gap: 0.5rem; margin-bottom: 0.4rem; }
.header-row input { flex: 1; }
.header-key { flex: 0 0 40% !important; }

/* ── Response Panel ──────────────────────────── */
.response-panel {
    background: #18181b; border: 1px solid #27272a; border-radius: 10px;
    padding: 1.5rem;
}
.response-panel h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.response-meta {
    display: flex; gap: 1rem; margin-bottom: 1rem; font-size: 0.85rem;
    align-items: center; flex-wrap: wrap;
}
.status-badge {
    padding: 0.2rem 0.6rem; border-radius: 6px; font-weight: 700; font-size: 0.85rem;
}
.status-2xx { background: rgba(34,197,94,0.15); color: #4ade80; }
.status-3xx { background: rgba(59,130,246,0.15); color: #60a5fa; }
.status-4xx { background: rgba(251,191,36,0.15); color: #fbbf24; }
.status-5xx { background: rgba(248,113,113,0.15); color: #f87171; }
.response-section { margin-bottom: 1rem; }
.response-section h4 { font-size: 0.85rem; font-weight: 600; color: #a1a1aa; margin-bottom: 0.5rem; }
.response-section pre {
    background: #0f0f11; border: 1px solid #27272a; border-radius: 8px;
    padding: 1rem; font-size: 0.82rem; line-height: 1.5; max-height: 400px; overflow: auto;
    color: #d4d4d8;
}

#error-panel pre { color: #f87171; }

/* ── Toast ───────────────────────────────────── */
.toast {
    position: fixed; top: 1rem; right: 1rem; z-index: 1000;
    background: #18181b; border: 1px solid #27272a; border-radius: 8px;
    padding: 0.6rem 1rem; font-size: 0.82rem; color: #a1a1aa;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ── Legal Page ──────────────────────────────── */
.legal-page { padding: 2rem 0 4rem; }
.legal-page .brand-link { display: inline-block; font-weight: 700; font-size: 1.1rem; color: #e4e4e7; margin-bottom: 2rem; }
.legal-page h1 { font-size: 2rem; font-weight: 700; margin-bottom: 2rem; }
.legal-page section { margin-bottom: 2rem; }
.legal-page h2 { font-size: 1.15rem; font-weight: 600; color: #a78bfa; margin-bottom: 0.6rem; }
.legal-page p { color: #a1a1aa; font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.6rem; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .features-grid, .steps { grid-template-columns: 1fr; }
    .bin-layout { grid-template-columns: 1fr; }
    .request-list { max-height: 300px; }
    .send-layout { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .form-group-method { flex: none; }
}
