.IpLensPage {
    min-height: 100%;
    margin: 0;
    background: #08080b;
    font-family: 'Exo', sans-serif;
}

.IpLensMain {
    width: min(980px, calc(100% - 1.2rem));
    margin: 4.3rem auto 1rem;
    display: grid;
    gap: 0.85rem;
}

.IpLensHeader,
.IpLensCard {
    border: 1px solid #273541;
    border-radius: 6px;
    padding: 1rem;
    background: #0f171d;
}

.IpLensEyebrow {
    margin: 0 0 0.35rem;
    color: #86b5d6;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.IpLensHeader h1 {
    margin: 0;
    color: #d9ebf8;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.1rem);
}

.IpLensHeader p {
    margin: 0.45rem 0 0;
    color: #9db4c5;
    line-height: 1.5;
}

.IpLensCard h2 {
    margin: 0 0 0.75rem;
    color: #d9ebf8;
    font-size: 1.05rem;
}

.IpLensCard h2:not(:first-child) {
    margin-top: 1.25rem;
}

.IpLensCardHeaderRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.IpLensCardHeaderRow h2 {
    margin: 0;
}

/* Sticky "your IP addresses" bar */
.IpLensStickyBar {
    position: sticky;
    top: 0;
    z-index: 5;
    border: 1px solid #273541;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    background: #0f171d;
}

.IpLensStickyTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.IpLensStickyLabel {
    color: #86b5d6;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.IpLensStickyFields {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.IpLensStickyExit {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.IpLensStickyExit .IpLensButton {
    text-decoration: none;
}

.IpLensStickyField {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 8rem;
}

.IpLensStickyFieldLabel {
    color: #86b5d6;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.IpLensStickyFieldValue {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #e2eef7;
    font-size: 0.95rem;
    border-radius: 4px;
    padding: 0.05rem 0.15rem;
}

.IpLensIconButton {
    align-self: flex-start;
    margin-top: 0.15rem;
    border: 1px solid #3c5d75;
    border-radius: 4px;
    background: #162631;
    color: #d9ebf8;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
}

.IpLensIconButton:hover,
.IpLensIconButton:focus-visible {
    outline: 2px solid #7eb7de;
    outline-offset: 2px;
    background: #1e3241;
}

/* Lookup bar */
.IpLensLookupBar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.IpLensLookupInput {
    flex: 1 1 220px;
    border: 1px solid #3c5d75;
    border-radius: 20px;
    background: #162631;
    color: #e2eef7;
    font: inherit;
    padding: 0.5rem 0.9rem;
}

.IpLensLookupInput:focus-visible {
    outline: 2px solid #7eb7de;
    outline-offset: 2px;
}

.IpLensBadge {
    color: #86b5d6;
    background: #1e3241;
    border-radius: 10px;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    white-space: nowrap;
}

.IpLensLookupResults {
    margin-top: 0.85rem;
}

.IpLensLookupMessage {
    margin: 0.85rem 0 0;
    color: #b8ccdb;
}

/* Tabs */
.IpLensTabs {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-bottom: 1px solid #273541;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
}

.IpLensTabGroup {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.IpLensTabGroupLabel {
    color: #5f7d92;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.IpLensTabGroupButtons {
    display: flex;
    gap: 0.15rem;
    flex-wrap: wrap;
}

.IpLensTabDivider {
    width: 1px;
    align-self: stretch;
    background: #273541;
    margin: 0 0.25rem;
}

@media (max-width: 640px) {
    .IpLensTabDivider {
        display: none;
    }
}

.IpLensTab {
    border: none;
    background: none;
    color: #86b5d6;
    font: inherit;
    font-size: 0.9rem;
    padding: 0.55rem 0.7rem;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.IpLensTab:hover,
.IpLensTab:focus-visible {
    color: #d9ebf8;
}

.IpLensTab.is-active {
    color: #d9ebf8;
    border-bottom-color: #7eb7de;
}

.IpLensPlaceholder {
    margin: 0;
    color: #9db4c5;
}

.IpLensCompareWrap {
    overflow-x: auto;
}

.IpLensCompareTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.IpLensCompareTable th,
.IpLensCompareTable td {
    border-bottom: 1px solid #273541;
    padding: 0.5rem 0.55rem;
    text-align: left;
    vertical-align: top;
    color: #e2eef7;
    overflow-wrap: anywhere;
}

.IpLensCompareTable thead th {
    color: #9fc5df;
    font-weight: 700;
}

.IpLensCompareTable tbody th {
    color: #86b5d6;
    width: 28%;
    font-weight: 600;
}

.IpLensCompareTable tbody td {
    width: 36%;
}

.IpLensButton {
    border: 1px solid #3c5d75;
    border-radius: 4px;
    background: #162631;
    color: #d9ebf8;
    cursor: pointer;
    font-weight: 600;
    padding: 0.46rem 0.75rem;
}

.IpLensButton:hover,
.IpLensButton:focus-visible {
    outline: 2px solid #7eb7de;
    outline-offset: 2px;
    background: #1e3241;
}

.IpLensStatus {
    margin: 0.75rem 0 0;
    color: #b8ccdb;
}

.IpLensDetails {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(130px, 220px) 1fr;
    row-gap: 0.45rem;
    column-gap: 0.7rem;
}

.IpLensDetails dt {
    color: #86b5d6;
    font-size: 0.9rem;
}

.IpLensDetails dd {
    margin: 0;
    color: #e2eef7;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    border-radius: 4px;
    padding: 0.1rem 0.2rem;
}

.IpLensTextarea {
    width: 100%;
    min-height: 90px;
    border: 1px solid #3c5d75;
    border-radius: 8px;
    background: #162631;
    color: #e2eef7;
    font: inherit;
    font-family: monospace;
    padding: 0.5rem 0.7rem;
    resize: vertical;
}

.IpLensToolActions {
    margin-top: 0.6rem;
}

.IpLensDetails dt,
.IpLensDetails dd {
    padding-bottom: 0.1rem;
}

.IpLensNotes {
    margin: 0;
    padding-left: 1.1rem;
    color: #c3d4e1;
    line-height: 1.45;
}

/* Skeleton loading + update flash */
.IpLensSkeleton {
    display: inline-block;
    height: 0.85em;
    width: 80%;
    min-width: 4rem;
    border-radius: 4px;
    background: linear-gradient(90deg, #162631 25%, #1e3241 50%, #162631 75%);
    background-size: 200% 100%;
    animation: IpLensShimmer 1.1s infinite;
}

.IpLensSkeletonLabel {
    width: 60%;
}

@keyframes IpLensShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes IpLensFlashUpdate {
    0% { background-color: #1e3241; }
    100% { background-color: transparent; }
}

.IpLensFlash {
    animation: IpLensFlashUpdate 0.9s ease;
}

@media (max-width: 640px) {
    .IpLensDetails {
        grid-template-columns: 1fr;
        row-gap: 0.25rem;
    }

    .IpLensDetails dd {
        margin-bottom: 0.4rem;
    }
}

@media (max-width: 960px) {
    .IpLensCompareTable {
        min-width: 0;
    }

    .IpLensCompareTable thead {
        display: none;
    }

    .IpLensCompareTable,
    .IpLensCompareTable tbody,
    .IpLensCompareTable tr,
    .IpLensCompareTable th,
    .IpLensCompareTable td {
        display: block;
        width: 100%;
    }

    .IpLensCompareTable tr {
        border: 1px solid #273541;
        border-radius: 5px;
        margin-bottom: 0.55rem;
        padding: 0.35rem;
        background: #121a21;
    }

    .IpLensCompareTable tbody th {
        border-bottom: 0;
        color: #9fc5df;
    }

    .IpLensCompareTable td {
        border-bottom: 0;
        padding-top: 0.12rem;
    }

    .IpLensCompareTable td::before {
        display: inline-block;
        min-width: 3.9rem;
        margin-right: 0.4rem;
        color: #86b5d6;
        font-weight: 700;
    }

    .IpLensCompareTable td:nth-of-type(1)::before {
        content: 'IPv4';
    }

    .IpLensCompareTable td:nth-of-type(2)::before {
        content: 'IPv6';
    }
}
