:root {
    --background: #f6f7f9;
    --card-background: #ffffff;
    --accent: #147a80;
    --accent-hover: #0d5a5f;
    --text-primary: #1a1d23;
    --text-secondary: #5a6472;
    --border-soft: rgba(20, 122, 128, 0.16);
    --shadow-soft: 0 22px 48px -32px rgba(16, 24, 40, 0.55);
    --radius-lg: 24px;
    --radius-md: 16px;
    --transition: 0.22s ease-in-out;
    --font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --mono-font: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background-color: #0b111a;
    color: var(--text-primary);
    font-family: var(--font-family);
    position: relative;
    overflow: hidden;
    transition: background-color 0.5s ease;
    --hero-image: url('assets/bg_fallback.jpg');
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(140deg, rgba(9, 14, 22, 0.52), rgba(14, 24, 35, 0.4));
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--hero-image) center/cover no-repeat fixed;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: -1;
    pointer-events: none;
}

body.background-loaded::after {
    opacity: 1;
}

body.background-transition::after {
    opacity: 0;
}

.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;
}

.container {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2.15rem, 4vw, 2.85rem);
    letter-spacing: -0.02em;
    color: #f5f7fb;
    text-shadow: 0 18px 32px rgba(9, 14, 22, 0.4), 0 8px 20px rgba(9, 14, 22, 0.55);
}

.privacy {
    margin: 0 auto;
    max-width: 36ch;
    line-height: 1.65;
    color: var(--text-secondary);
}

.ip-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.88);
    border-radius: var(--radius-lg);
    padding: 2.75rem 2.5rem;
    box-shadow: 0 26px 60px -32px rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.ip-card .label {
    margin: 0;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.ip {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 3.4rem);
    font-family: var(--mono-font);
    word-break: break-word;
}

.copy-btn {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 2.75rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--accent);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), opacity var(--transition);
    box-shadow: 0 12px 32px -20px rgba(20, 122, 128, 0.8);
}

.copy-btn:hover,
.copy-btn:focus-visible {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -18px rgba(13, 90, 95, 0.45);
}

.copy-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(20, 122, 128, 0.25);
}

.copy-btn:disabled {
    cursor: default;
}

.copy-btn.is-copied {
    background: #cccccc;
    color: #1a1d23;
    cursor: default;
    opacity: 0.7;
    box-shadow: none;
}

.copy-btn.is-copied:hover,
.copy-btn.is-copied:focus-visible {
    transform: none;
}

.info-panel {
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.6rem 2rem;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(10, 18, 28, 0.62), rgba(14, 26, 36, 0.55));
    box-shadow: 0 24px 46px -28px rgba(10, 12, 16, 0.75);
    backdrop-filter: blur(12px);
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    color: rgba(241, 245, 249, 0.85);
}

.info-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.info-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    column-gap: 2.25rem;
    row-gap: 0.75rem;
    font-family: var(--font-family);
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 500;
    color: #f8fafc;
}

.info-entry {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
}

.info-text {
    display: inline-flex;
    align-items: center;
}

.info-entry--time {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.privacy-indicator {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    z-index: 2;
}

.privacy-button {
    appearance: none;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(13, 23, 33, 0.75);
    color: #f8fafc;
    font-size: 1.35rem;
    cursor: pointer;
    box-shadow: 0 12px 32px -20px rgba(8, 20, 31, 0.75);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.privacy-button:hover,
.privacy-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px -24px rgba(8, 20, 31, 0.85);
    background: rgba(13, 23, 33, 0.9);
    outline: none;
}

.privacy-tooltip {
    position: absolute;
    bottom: calc(100% + 0.85rem);
    right: 0;
    max-width: min(260px, 80vw);
    padding: 0.75rem 0.95rem;
    border-radius: 12px;
    background: rgba(245, 249, 254, 0.96);
    color: #0f172a;
    font-size: 0.82rem;
    line-height: 1.45;
    box-shadow: 0 18px 30px -24px rgba(15, 23, 42, 0.8);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.privacy-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 16px;
    border-width: 8px;
    border-style: solid;
    border-color: rgba(245, 249, 254, 0.96) transparent transparent transparent;
}

.privacy-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 600px) {
    .info-inline {
        flex-direction: column;
        align-items: flex-start;
        column-gap: 0;
        row-gap: 0.65rem;
        color: #e2e8f0;
    }

    .info-entry {
        white-space: normal;
    }

    .privacy-indicator {
        bottom: 1rem;
        right: 1rem;
    }

    .privacy-tooltip {
        bottom: calc(100% + 0.65rem);
    }
}

.photo-credit {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 2;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(248, 250, 252, 0.9);
    font-family: var(--font-family);
    text-shadow: 0 12px 30px rgba(9, 14, 22, 0.8);
}

.photo-credit a {
    color: rgba(248, 250, 252, 0.92);
    text-decoration: underline;
    text-decoration-color: rgba(248, 250, 252, 0.55);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.photo-credit a:hover,
.photo-credit a:focus {
    text-decoration-color: rgba(248, 250, 252, 0.9);
}

@media (max-width: 600px) {
    .photo-credit {
        bottom: 0.9rem;
        left: 1rem;
        font-size: 0.76rem;
    }
}

code {
    background: rgba(20, 122, 128, 0.08);
    border-radius: 8px;
    padding: 0.25rem 0.55rem;
    font-family: var(--mono-font);
    font-size: 0.95rem;
}

@media (max-width: 600px) {
    body {
        padding: 2.5rem 1.25rem;
    }

    .ip-card {
        padding: 2.25rem 1.75rem;
    }

    .copy-btn {
        width: 100%;
    }

}
