@font-face {
    font-family: "OPTIBrianCond";
    src: url("/img/OPTIBrianCond.woff") format("woff");
    font-display: swap;
}

:root {
    color-scheme: dark;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #000;
    color: #fff;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 2rem;
    background: #000;
    color: #fff;
    text-align: center;
}

.page-shell {
    width: min(100%, 900px);
    margin: 0 auto;
}

@keyframes st-pulse {
    0%, 100% {
        text-shadow: 0 0 .12em rgba(255, 80, 80, .2), 0 0 .45em rgba(255, 0, 0, .25), 0 0 .9em rgba(160, 0, 0, .15);
    }
    50% {
        text-shadow: 0 0 .13em rgba(255, 120, 120, .5), 0 0 .6em rgba(255, 0, 0, .9), 0 0 1.2em rgba(180, 0, 0, .9);
    }
}

@keyframes st-fade-zoom {
    from { opacity: 0; transform: scale(.76); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes ups-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.35); }
}

h1,
h2,
h3 {
    font-family: "OPTIBrianCond", serif;
    font-weight: 400;
    color: transparent;
    -webkit-text-stroke: 1.6px #cc2a2a;
    letter-spacing: .1em;
    line-height: 1.05;
    text-transform: uppercase;
    text-shadow: 0 0 .12em rgba(255, 80, 80, .45), 0 0 .45em rgba(255, 0, 0, .3), 0 0 .9em rgba(160, 0, 0, .2);
}

h1,
h2 {
    opacity: 0;
    transform: scale(.76);
    animation: st-fade-zoom 3s ease-out forwards, st-pulse 3s ease-in-out infinite;
}

h1 {
    font-size: clamp(2rem, 7vw, 5rem);
}

.ip-label {
    margin-top: 1rem;
    font-size: 1.2rem;
}

.ip-address {
    max-width: 100%;
    margin-top: 1rem;
    overflow-wrap: anywhere;
    font-size: clamp(1.35rem, 6vw, 3rem);
}

.country-flag {
    display: inline-block;
    width: 70px;
    height: auto;
    margin: .5rem auto;
}

.connection-badge {
    display: block;
    width: 99px;
    height: 28px;
    margin: 1rem auto;
    image-rendering: auto;
}

.status-badge {
    display: block;
    width: 240px;
    height: 30px;
    margin: 1.25rem auto;
    border: 0;
}

.ups-bar {
    position: fixed;
    left: 0;
    z-index: 999999;
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, .25);
    color: #fff;
    background: #b66a00;
    font: 600 14px/1.3 system-ui, sans-serif;
    text-align: center;
    cursor: pointer;
}

.ups-bar.is-low {
    background: #b3261e;
    animation: ups-pulse 1.2s infinite;
}

.debug-panel {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid #333;
    border-radius: .75rem;
    background: #111;
    text-align: left;
}

.debug-panel h3 {
    opacity: 1;
    transform: none;
    animation: none;
    font-size: 1.5rem;
}

.debug-panel pre {
    overflow: auto;
    color: #7cff7c;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.debug-panel a {
    color: #9cf;
}

@media (prefers-reduced-motion: reduce) {
    h1,
    h2,
    .ups-bar {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

@media (max-width: 700px) {
    body { padding: 1rem; }
}
