:root {
    --teal: #2d7085;
    --teal-dark: #1f5263;
    --coral: #e45f51;
    --bg: #f4f8fa;
    --surface: #ffffff;
    --text: #1a2e36;
    --muted: #5a737c;
    --line: #d5e3e8;
    --radius: 14px;
    --shadow: 0 18px 40px rgba(45, 112, 133, 0.12);
    --footer-bg: #1f2a30;
    --footer-link-hover: #9ad7de;
    --transition: 160ms ease;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Trebuchet MS", Candara, sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, rgba(253, 216, 143, 0.45), transparent 55%),
        radial-gradient(ellipse 70% 45% at 100% 0%, rgba(188, 210, 217, 0.55), transparent 50%),
        linear-gradient(165deg, #eef5f7 0%, var(--bg) 45%, #e8f1f4 100%);
    display: flex;
    flex-direction: column;
}

.page {
    width: min(720px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    animation: rise 0.55s ease-out;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .page {
        animation: none;
    }

    .ip-value,
    .copy-btn,
    footer .footer-copyright a {
        transition: none;
    }
}

.brand a {
    display: inline-block;
}

.brand img {
    width: 180px;
    height: auto;
    display: block;
}

.hero,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
    padding: 2rem 1.75rem 1.75rem;
    position: relative;
    overflow: hidden;
}

.hero::before,
.panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--teal), var(--coral));
}

h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.55rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--teal-dark);
}

.lead {
    margin: 0 0 1.5rem;
    color: var(--muted);
    line-height: 1.55;
    max-width: 38rem;
}

.ip-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f7fbfd 0%, #eef5f8 100%);
    border: 1px solid var(--line);
}

.ip-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 600;
    width: 100%;
}

.ip-value {
    appearance: none;
    border: 0;
    background: transparent;
    margin: 0;
    font-family: "Cascadia Code", "Consolas", "Courier New", monospace;
    font-size: clamp(1.35rem, 4.5vw, 1.85rem);
    font-weight: 700;
    color: var(--teal-dark);
    letter-spacing: 0.02em;
    transition: background-color 200ms ease, color 200ms ease;
    border-radius: 6px;
    padding: 0.1rem 0.25rem;
    cursor: pointer;
    text-align: left;
}

.ip-value:hover {
    color: var(--teal);
}

.ip-value.fade {
    background-color: rgba(228, 95, 81, 0.18);
    color: var(--coral);
}

.copy-btn {
    appearance: none;
    border: 1px solid var(--teal);
    background: var(--teal);
    color: #fff;
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background var(--transition), transform 120ms ease, box-shadow var(--transition);
}

.copy-btn:hover {
    background: var(--teal-dark);
    box-shadow: 0 6px 16px rgba(45, 112, 133, 0.28);
}

.copy-btn:active {
    transform: translateY(1px);
}

.copy-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

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

.meta-item {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.meta-item dt {
    margin: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 600;
}

.meta-item dd {
    margin: 0.35rem 0 0;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.legal {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

.legal p {
    margin: 0 0 0.85rem;
}

.legal a {
    color: var(--teal);
}

.actions {
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: var(--teal);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 160px;
    border: 2px solid var(--teal);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--teal-dark);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(188, 210, 217, 0.45);
    color: var(--teal-dark);
    border-color: var(--teal);
}

.error-page {
    margin: 0 auto;
    padding: 48px 32px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
}

.error-page .error-code {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    margin: 0 0 8px;
    background: linear-gradient(90deg, var(--teal), var(--coral));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-page h1 {
    margin: 0 0 10px;
}

.error-page > p {
    margin: 0 auto;
    max-width: 40ch;
    color: var(--muted);
    line-height: 1.55;
}

.error-page .error-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

footer {
    margin-top: auto;
    padding: 18px 0;
    background-color: var(--footer-bg);
}

footer .footer-copyright {
    width: min(720px, calc(100% - 2rem));
    margin: 0 auto;
    color: rgb(255 255 255 / 75%);
    text-align: center;
    font-size: 0.9rem;
}

footer .footer-copyright .footer-main {
    margin-bottom: 6px;
}

footer .footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

footer .footer-copyright a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgb(255 255 255 / 35%);
    transition: border-color var(--transition), color var(--transition);
}

footer .footer-copyright a:hover {
    color: var(--footer-link-hover);
    border-bottom-color: var(--footer-link-hover);
}

@media (max-width: 520px) {
    .page {
        padding-top: 1.25rem;
    }

    .hero,
    .panel {
        padding: 1.5rem 1.15rem 1.25rem;
    }

    .brand img {
        width: 140px;
    }

    .copy-btn {
        width: 100%;
        justify-content: center;
    }

    .error-page {
        padding: 36px 20px;
    }

    .error-page .error-code {
        font-size: 3.5rem;
    }
}
