/* ============================================================
 * N4 IP Check — gold/black theme (matches main site)
 * Tokens come from /theme.css (linked before this file).
 * ============================================================ */

body {
    font-family: var(--n4-font);
    background:
        radial-gradient(ellipse 90% 45% at 50% 0%, rgba(255, 215, 0, 0.08), transparent),
        var(--n4-black);
    color: var(--n4-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0 0 40px;
    box-sizing: border-box;
    overflow-x: hidden;
    line-height: 1.6;
}

/* subheader spans full width */
.n4-subheader { width: 100%; box-sizing: border-box; }

.container {
    text-align: center;
    background: linear-gradient(160deg, rgba(28, 28, 28, 0.92), rgba(16, 16, 16, 0.94));
    padding: 26px 22px;
    border-radius: 22px;
    border: 1px solid var(--n4-gold-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--n4-shadow), 0 0 40px rgba(255, 215, 0, 0.06);
    max-width: 520px;
    width: calc(100% - 40px);
    margin-top: 26px;
    animation: n4-fade-up 0.7s var(--n4-ease);
    transition: box-shadow 0.3s;
}

.container:hover {
    box-shadow: var(--n4-shadow), 0 0 60px rgba(255, 215, 0, 0.1);
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.logo {
    width: 84px;
    height: 84px;
    margin-bottom: 14px;
    animation: n4-float 3.2s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s var(--n4-ease), filter 0.3s;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.8));
}

h1 {
    font-size: 1.55rem;
    margin: 0;
    color: var(--n4-gold);
    text-shadow: 0 2px 12px rgba(255, 215, 0, 0.3);
    line-height: 1.5;
}

/* ---------- info box ---------- */
.info-box {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.14);
    padding: 16px;
    border-radius: var(--n4-radius);
    text-align: left;
    transition: border-color 0.3s;
}

.info-box:hover { border-color: rgba(255, 215, 0, 0.3); }

.info-item {
    margin: 11px 0;
    padding: 8px 10px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(18px);
    animation: n4-fade-up 0.5s var(--n4-ease) forwards;
    transition: background 0.25s;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.info-item:hover { background: rgba(255, 215, 0, 0.06); }

.info-label {
    font-weight: 700;
    color: var(--n4-gold);
    display: inline-block;
    min-width: 104px;
}

.info-value {
    margin-left: 8px;
    color: var(--n4-text);
    word-break: break-word;
    font-weight: 500;
}

.flag { margin-left: 8px; font-size: 1.25rem; }

.map {
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    height: 170px;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 215, 0, 0.14);
    position: relative;
    transition: border-color 0.3s;
}

.map-loading, .map-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--n4-muted);
    font-size: 0.9rem;
}

/* loading dots */
.loading-dots::after {
    content: '.';
    animation: n4-dots 1.5s steps(5, end) infinite;
    color: var(--n4-gold);
}

@keyframes n4-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* ---------- notification ---------- */
.notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 13px 26px;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s var(--n4-ease);
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 90%;
    box-sizing: border-box;
}

.notification.success { background: rgba(20, 90, 50, 0.94); border-color: rgba(46, 204, 113, 0.4); }
.notification.error { background: rgba(140, 30, 30, 0.94); border-color: rgba(255, 110, 110, 0.4); }
.notification.hidden { opacity: 0; pointer-events: none; }
.notification:not(.hidden) { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- tabs ---------- */
.tabs {
    display: flex;
    justify-content: center;
    margin-top: 22px;
    gap: 10px;
}

.tab-button {
    padding: 12px 18px;
    border: 1px solid var(--n4-gold-border);
    border-radius: 999px;
    background: var(--n4-gold-soft);
    color: var(--n4-gold);
    cursor: pointer;
    transition: all 0.28s var(--n4-ease);
    font-family: var(--n4-font);
    font-size: 0.95rem;
    font-weight: 600;
    flex: 1;
    max-width: 210px;
}

.tab-button:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--n4-shadow-gold);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--n4-gold), var(--n4-gold-deep));
    color: #0A0A0A;
    box-shadow: 0 6px 18px rgba(255, 215, 0, 0.35);
}

.tab-button:focus-visible {
    outline: 2px solid var(--n4-gold);
    outline-offset: 2px;
}

/* ---------- search box ---------- */
.search-box {
    margin: 4px 0 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.14);
    padding: 16px;
    border-radius: var(--n4-radius);
    transition: border-color 0.3s;
}

.search-box:focus-within { border-color: rgba(255, 215, 0, 0.4); }

.search-box input {
    padding: 13px 18px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 999px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    font-family: var(--n4-font);
    font-size: 1rem;
    background: rgba(10, 10, 10, 0.7);
    color: var(--n4-text);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.search-box input::placeholder { color: var(--n4-faint); }

.search-box input:focus {
    outline: none;
    border-color: var(--n4-gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.18);
}

.search-box button {
    padding: 13px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--n4-gold), var(--n4-gold-deep));
    color: #0A0A0A;
    cursor: pointer;
    transition: transform 0.25s var(--n4-ease), box-shadow 0.25s;
    font-family: var(--n4-font);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-shadow: 0 6px 18px rgba(255, 215, 0, 0.3);
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255, 215, 0, 0.45);
}

.search-box button:active { transform: translateY(0); }

/* ---------- leaflet ---------- */
.leaflet-container { background: #0d0d0d !important; font-family: var(--n4-font); }
.leaflet-popup-content { color: #222; }

/* ---------- responsive ---------- */
@media (max-width: 600px) {
    .container { padding: 20px 16px; margin-top: 18px; }
    .logo { width: 64px; height: 64px; }
    h1 { font-size: 1.3rem; }
    .info-box { padding: 10px; }
    .info-label { min-width: 86px; font-size: 0.88rem; }
    .info-value { font-size: 0.88rem; }
    .tab-button { padding: 10px 12px; font-size: 0.85rem; }
    .notification { width: calc(100% - 32px); text-align: center; font-size: 0.9rem; }
}

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--n4-gold);
    outline-offset: 2px;
}
