:root {
    --bg-body: #020d11;
    --primary: #00c2b2;
    --primary-hover: #00a596;
    --text-on-dark: #ffffff;
    --card-bg: #ffffff;
    --card-text: #1f2937;
    --card-label: #6b7280;
    --row-alt: #f8fafc;
    --success: #22c55e;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
    outline: none;
}

body {
    margin: 0;
    font-family: 'Manrope', 'Noto Sans SC', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-on-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 3rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-on-dark);
}

.brand svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

nav {
    display: flex;
    gap: 2.5rem;
}

nav a {
    color: var(--text-on-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

nav a:hover {
    opacity: 1;
    color: var(--primary);
}

.lang {
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 2rem;
    letter-spacing: 0.5px;
}

.search-wrapper {
    width: 100%;
    max-width: 680px;
    margin-bottom: 3.5rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(4, 20, 24, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 4px;
    height: 52px;
}

.search-icon {
    padding: 0 12px 0 16px;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 0.9rem;
    font-family: inherit;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-btn {
    background: var(--primary);
    color: #013531;
    border: none;
    padding: 0 24px;
    height: 100%;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
}

.search-btn:hover {
    background: var(--primary-hover);
}

.result-card {
    background: var(--card-bg);
    width: 100%;
    border-radius: 12px;
    padding: 2.5rem 3rem;
    color: var(--card-text);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.result-card h2 {
    margin: 0 0 2rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 0.9rem;
}

.result-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    padding: 1rem 1.5rem;
    align-items: center;
}

.result-item:nth-child(even) {
    background: #f9fafb;
}

.result-item:nth-child(odd) {
    background: #ffffff;
}

.result-label {
    color: #6b7280;
    font-weight: 600;
}

.result-value {
    font-weight: 500;
    color: #1f2937;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.copy-btn {
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #ffffff;
    color: #1f2937;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.copy-btn:hover {
    border-color: rgba(15, 23, 42, 0.3);
}

.eye-btn {
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #ffffff;
    color: #1f2937;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.eye-btn:hover {
    border-color: rgba(15, 23, 42, 0.3);
}

.eye-icon {
    display: none;
}

.eye-btn[data-ip-visibility='show'] .eye-open {
    display: inline;
}

.eye-btn[data-ip-visibility='hide'] .eye-closed {
    display: inline;
}

.result-value a {
    color: var(--primary-hover);
    text-decoration: none;
    border-bottom: 1px dashed;
}

.globalping-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.globalping-status {
    font-weight: 600;
    color: #6b7280;
    text-align: center;
}

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

.globalping-item {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.globalping-country {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.globalping-flag {
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.globalping-name {
    font-weight: 600;
    color: #111827;
}

.globalping-latency {
    font-weight: 700;
    color: #1f2937;
}

.globalping-latency.latency-low {
    color: #16a34a;
}

.globalping-latency.latency-mid {
    color: #ca8a04;
}

.globalping-latency.latency-high {
    color: #dc2626;
}

.source-flag {
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.ent-badge {
    background: #86efac;
    color: #14532d;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 6px;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
}

.badge.home {
    background: #22c55e;
    color: white;
}

.badge.center {
    background: #fbbf24;
    color: white;
}

.badge.danger {
    background: #f87171;
    color: white;
}

.badge.info {
    background: #60a5fa;
    color: white;
}

.badge.warn {
    background: #fbbf24;
    color: #7c2d12;
}

.risk-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
}

.risk-bar {
    flex: 1;
    height: 8px;
    background: linear-gradient(to right, #22c55e, #eab308, #ef4444);
    border-radius: 99px;
    position: relative;
}

.risk-knob {
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #a3e635;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 26%;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Site Footer */
.site-footer {
    background-color: transparent;
    /* Blend with body */
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 80px 0 40px;
    margin-top: auto;
    font-size: 0.95rem;
    color: #94a3b8;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.brand-col {
    padding-right: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.footer-desc {
    line-height: 1.6;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
}

.footer-social-links {
    display: flex;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
}

.social-btn .tooltip {
    position: absolute;
    bottom: 46px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.social-btn .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
}

.social-btn:hover .tooltip,
.social-btn:focus-visible .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #013531;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 194, 178, 0.4);
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links-list a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-links-list a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 24px 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .brand-col {
        padding-right: 0;
        align-items: center;
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
    }

    .footer-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-social-links {
        justify-content: center;
    }

    .footer-col:not(.brand-col) {
        align-items: center;
    }

    .footer-links-list {
        align-items: center;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    nav {
        display: none;
    }

    .result-card {
        padding: 1.5rem;
    }

    .result-item {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 1rem;
    }


}