 :root {
    --bg-start: #f8f2e7;
    --bg-end: #d6eff3;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --text: #103244;
    --muted: #5b6b77;
    --brand: #0f766e;
    --brand-strong: #2563eb;
    --danger: #dc2626;
    --success: #0f9f6e;
    --border: rgba(16, 50, 68, 0.12);
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.16), transparent 24%),
        linear-gradient(160deg, var(--bg-start), var(--bg-end));
}

.shell {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    gap: 22px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero {
    position: relative;
    display: block;
    padding: 28px;
}

.hero-version {
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
    color: var(--muted);
}

#hero-version-value {
    font: inherit;
    color: inherit;
}

.hero h1,
.panel-heading h2,
.location-control h3 {
    margin: 0;
    letter-spacing: -0.03em;
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.75rem;
    color: var(--brand);
    font-weight: 700;
}

.lead,
.panel-copy,
.control-status {
    color: var(--muted);
    line-height: 1.45;
}

.hero-copy {
    max-width: 680px;
}

.hero-copy h1 {
    font-size: clamp(2.3rem, 5vw, 4.2rem);
}

.request-panel {
    padding: 20px 24px 24px;
}

.panel-heading {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 16px;
}

.panel-copy {
    max-width: 420px;
    margin: 0;
}

.method-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    border: 0;
}

.method-toggle-group label,
.toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(16, 50, 68, 0.12);
    background: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

.method-toggle-group input,
.toggle-row input {
    margin: 0;
}

.location-controls {
    margin-top: 14px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.location-control {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(16, 50, 68, 0.12);
    display: grid;
    gap: 12px;
}

.location-control-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 700;
}

.location-control label {
    display: grid;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
}

.location-control input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(16, 50, 68, 0.16);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
}

.toggle-row {
    justify-content: flex-start;
    cursor: pointer;
}

.control-status {
    margin: 0;
    min-height: 1.4em;
    font-size: 0.9rem;
}

.control-status[data-state="success"] {
    color: var(--success);
}

.control-status[data-state="error"] {
    color: var(--danger);
}

.map-panel {
    padding: 18px;
}

.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(224, 242, 254, 0.78), rgba(255, 255, 255, 0.7));
    border: 1px solid rgba(16, 50, 68, 0.08);
}

.world-map {
    display: block;
    width: 100%;
    height: auto;
}

.region-dot {
    fill: #cbd5e1;
    transition: fill 180ms ease, opacity 180ms ease, filter 180ms ease;
}

.region-dot.active {
    fill: var(--brand-strong);
    filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.25));
}

.region-dot.active.unhealthy {
    fill: var(--danger);
    filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.28));
}

.region-label {
    font-size: 12px;
    fill: #1f2937;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.status-overlay {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: min(560px, calc(100% - 36px));
    padding: 8px 9px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(16, 50, 68, 0.06);
    box-shadow: none;
    backdrop-filter: blur(9px);
}

.status-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.2fr 0.8fr 0.8fr 0.9fr;
    gap: 8px;
    align-items: center;
}

.status-header {
    padding: 0 0 6px;
    color: var(--muted);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 500;
    opacity: 0.8;
}

.status-entries {
    display: grid;
    gap: 3px;
    max-height: 230px;
    overflow: auto;
}

.status-row {
    font-size: 0.7rem;
    font-family: "Courier New", Courier, monospace;
    color: rgba(16, 50, 68, 0.8);
    padding: 5px 7px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(16, 50, 68, 0.04);
    transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.status-row:hover {
    background: transparent;
    border-color: rgba(16, 50, 68, 0.1);
    color: rgba(16, 50, 68, 0.95);
    transform: translateY(-1px);
}

.status-row .status-cell.status-success {
    color: var(--success);
    font-weight: 700;
}

.status-row .status-cell.status-error,
.status-row .status-cell.status-unavailable,
.status-row .status-cell.status-5xx {
    color: var(--danger);
    font-weight: 700;
}

.status-row .status-cell.status-503,
.status-row .status-cell.status-502,
.status-row .status-cell.status-500 {
    color: var(--danger);
    font-weight: 700;
}

.status-row .status-cell.status-text {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-row .status-cell.status-time,
.status-row .status-cell.status-response {
    white-space: nowrap;
}

@media (max-width: 1080px) {
    .location-controls {
        grid-template-columns: 1fr;
    }

    .panel-heading {
        flex-direction: column;
        align-items: start;
    }

    .status-overlay {
        position: static;
        width: auto;
        margin: 14px;
    }
}

@media (max-width: 720px) {
    body {
        padding: 14px;
    }

    .request-panel,
    .hero {
        padding: 18px;
    }

    .hero-version {
        top: 14px;
        right: 18px;
        font-size: 0.82rem;
    }

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

    .status-header {
        display: none;
    }

    .status-row {
        display: grid;
        gap: 6px;
    }
}
