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

[hidden] {
    display: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    color: #e4e4e7;
    line-height: 1.6;
}

/* header stuff */

/* header stuff */
.top-nav {
    background: #111;
    border-bottom: 1px solid #27272a;
    padding: 2rem 0;
}

.nav-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #10b981;
}

.tagline {
    color: #71717a;
    font-size: 1rem;
}

/* content wrapper */
.main-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.docs-section {
    margin-bottom: 4rem;
}

.section-top {
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.5rem;
    color: #fafafa;
    margin-bottom: 0.5rem;
}

.intro-text {
    color: #a1a1aa;
}

/* cards */
.cards-container {
    display: grid;
    gap: 2rem;
}

.api-card {
    background: #111;
    border: 1px solid #27272a;
    border-radius: 12px;
    overflow: hidden;
}

.card-top {
    background: #18181b;
    padding: 1.5rem;
    border-bottom: 1px solid #27272a;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.http-method {
    background: #10b981;
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.route-path {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1.25rem;
    color: #fafafa;
}

.card-info {
    color: #a1a1aa;
    font-size: 0.95rem;
}

/* rate limiting stuff - adjusted colors to match warning state */
.limit-notice {
    display: inline-block;
    background: #422006;
    color: #fbbf24;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.card-content {
    padding: 1.5rem;
}

.content-block {
    margin-bottom: 1.5rem;
}

.content-block:last-child {
    margin-bottom: 0;
}

.block-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* params */
.params-list {
    display: grid;
    gap: 0.75rem;
}

.single-param {
    background: #18181b;
    border: 1px solid #27272a;
    padding: 1rem;
    border-radius: 6px;
}

.param-title {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #10b981;
    font-weight: 600;
    font-size: 0.95rem;
}

.param-info {
    color: #71717a;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.param-detail {
    color: #a1a1aa;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* json examples */
.json-sample {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 6px;
    padding: 1rem;
}

.json-sample pre {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: #e4e4e7;
    overflow-x: auto;
}

.callout-box {
    background: #0c4a6e;
    border-left: 3px solid #0ea5e9;
    padding: 1rem;
    border-radius: 6px;
    color: #7dd3fc;
    font-size: 0.9rem;
}

/* reference sections at bottom */
.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.ref-item {
    background: #111;
    border: 1px solid #27272a;
    padding: 1.5rem;
    border-radius: 8px;
}

.ref-name {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ref-explain {
    color: #a1a1aa;
    font-size: 0.9rem;
}

code {
    background: #27272a;
    color: #10b981;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
}

/* Server browser */
:root {
    color-scheme: dark;
}

.hero {
    padding: 2.5rem 0 1.5rem;
}

.hero h2 {
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.hero p {
    color: #a1a1aa;
    max-width: 820px;
}

.panel {
    background: #111;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 1.5rem;
}

.panel + .panel {
    margin-top: 1.5rem;
}

.panel-title {
    font-size: 1.1rem;
    color: #fafafa;
    margin-bottom: 1rem;
    font-weight: 700;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field label {
    font-size: 0.8rem;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.field input,
.field select {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    color: #e4e4e7;
    font-size: 0.95rem;
}

.field input::placeholder {
    color: #52525b;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn {
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-weight: 600;
    cursor: pointer;
    background: #0a0a0a;
    color: #fafafa;
}

.btn-primary {
    background: #10b981;
    color: #020617;
    border-color: transparent;
}

.btn-muted {
    color: #a1a1aa;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.summary {
    color: #a1a1aa;
    font-size: 0.95rem;
}

.loading {
    color: #fbbf24;
    font-weight: 600;
}

.server-grid {
    display: grid;
    gap: 1rem;
}

.server-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    display: grid;
    gap: 0.6rem;
}

.server-card--interactive {
    transition: border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.server-card--interactive:hover {
    border-color: #10b981;
    transform: translateY(-2px);
}

.server-card--interactive:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

.server-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.server-ip {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1.05rem;
    color: #10b981;
}

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

.server-pill {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid #27272a;
    color: #a1a1aa;
}

.server-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
    color: #a1a1aa;
    font-size: 0.9rem;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: #71717a;
    border: 1px dashed #27272a;
    border-radius: 12px;
    background: #0c0c0d;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    margin-top: 1rem;
}

.pagination input {
    width: 90px;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    color: #e4e4e7;
}

.lookup-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.lookup-row input {
    flex: 1;
    min-width: 200px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.72);
    display: grid;
    place-items: center;
    padding: 2rem;
    z-index: 50;
}

.modal-card {
    width: min(920px, 96vw);
    max-height: 85vh;
    background: #0b0b0f;
    border: 1px solid #27272a;
    border-radius: 16px;
    padding: 1.5rem;
    overflow: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.modal-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fafafa;
}

.modal-subtitle {
    color: #a1a1aa;
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.whereis-action {
    margin-top: 0.6rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.detail-item {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #71717a;
}

.detail-value {
    margin-top: 0.35rem;
    color: #e4e4e7;
    font-size: 0.95rem;
}

.detail-subtitle {
    margin-top: 1rem;
    font-size: 1rem;
    color: #fafafa;
    font-weight: 700;
}

.detail-note {
    color: #71717a;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.who-list,
.whereis-list {
    margin-top: 1rem;
}

.who-grid,
.whereis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.who-item,
.whereis-item {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
}

.who-name,
.whereis-ip {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #10b981;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.who-meta,
.whereis-meta {
    color: #a1a1aa;
    font-size: 0.85rem;
}

.error {
    color: #f87171;
    font-weight: 600;
}

@media (max-width: 720px) {
    .status-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
