@property --result-color {
    syntax: "<color>";
    inherits: true;
    initial-value: var(--accent-color);
}

/* Status badge with rotated background card */
.status-badge {
    position: relative;
    display: inline-block;
    padding: 0.2em 0.4em;
    font-weight: inherit;
    z-index: 1;
}

.status-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 100px;
    transition: transform 0.3s ease;
}

.status-badge:hover::after {
    transform: rotate(0deg);
}

.status-badge.status-danger {
    color: #fff;
}

.status-badge.status-danger::after {
    background: #d91e2b;
}

.status-badge.status-success {
    color: #fff;
}

.status-badge.status-success::after {
    background: #068f21;
}

/* Status circle icon before h2 */
.status-circle-icon {
    width: 48px;
    height: 48px;
    margin-right: 0.5rem;
    vertical-align: middle;
    flex-shrink: 0;
}

.result-message {
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-message h2 {
    margin: 0;
}

/* VPN Check hero & results */
.vpncheck-hero {
    position: relative;
    overflow: hidden;
    height: 560px;
    padding: 0;
    background-image: url('../assets/images/vpn.webp');
    background-color: rgb(0, 3, 35);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    transition: --result-color 2s;
}

.vpncheck-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 3, 35, .5);
}

.vpncheck-hero .hero-layout {
    position: relative;
    z-index: 2;
    display: block;
    height: 100%;
}

.vpncheck-hero .hero-title {
    color: #fff;
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin: 0;
    text-align: center;
}

.vpncheck-hero .hero-subtitle {
    color: #fff;
    opacity: .9;
    text-align: center;
    margin: .25rem 0 1rem;
    font-size: 1.5rem;
}

.vpncheck-hero .hero-note {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #fff;
    opacity: .8;
    text-align: center;
    max-width: 840px;
    margin: 2rem auto 2rem;
}

.vpncheck-hero .hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.75rem;
    padding-right: 1.25rem;
    min-width: 240px;
    border-radius: 999px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: .2s;
}

.vpncheck-hero .hero-btn:hover {
    transform: translateY(-2px);
    background: #b91c1c;
}

.vpncheck-hero .hero-initial {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    text-align: center;
    align-items: center;
    justify-content: center;
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform .4s ease, opacity .4s ease, filter .4s ease;
}

.vpncheck-hero.running .hero-initial {
    transform: translateY(-150px);
}

.vpncheck-hero .hero-initial * {
    transition: .4s ease;
}

.vpncheck-hero.running .hero-initial *:not(h1) {
    opacity: 0;
    filter: blur(10px);
    visibility: hidden;
    pointer-events: none;
}

.vpncheck-hero.running .hero-initial h1 {
    font-size: 2rem;
}

.vpncheck-hero .hero-progress {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transform: scale(0.5);
    transition: .35s ease;
    pointer-events: none;
    visibility: hidden;
    z-index: 3;
}

.vpncheck-hero.running .hero-progress {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    visibility: visible;
}

/* Progress ring */
.vpncheck-hero .progress-ring {
    position: relative;
    width: 240px;
    height: 240px;
    transition: .35s ease;
}

.vpncheck-hero .ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.vpncheck-hero .ring-track {
    stroke: rgba(255, 255, 255, .15);
}

.vpncheck-hero .ring-spinner {
    stroke: var(--accent-color);
    opacity: 1;
}

.vpncheck-hero .ring-result {
    stroke: var(--result-color);
    opacity: 0;
    transition: opacity .2s ease, stroke-dashoffset .45s ease, stroke .45s ease;
    stroke-dasharray: 653 653;
    stroke-dashoffset: 653;
}

.vpncheck-hero .ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    transform: scale(0.8);
    opacity: 0;
    transition: .4s ease;
}

.vpncheck-hero .ring-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vpncheck-hero .ring-icon img {
    width: 104px;
    height: 104px;
    animation: vpc-icon-show 0.5s ease both;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

@keyframes vpc-icon-show {
    0% {
        opacity: 0;
        transform: scale(0);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* Hide progress ring on result */
.vpncheck-hero.show-result .hero-progress {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Result layout */
.vpncheck-hero .hero-result {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.5rem;
    color: #fff;
    opacity: 0;
    transform: translateY(30px);
    transition: transform .4s ease, opacity .4s ease;
    visibility: hidden;
    pointer-events: none;
    z-index: 4;
    padding: 0 2rem;
}

.vpncheck-hero.show-result .hero-result {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

/* IP Address - top most */
.vpncheck-hero .result-ip {
    order: -2;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

/* Hero Score Cards */
.vpncheck-hero .hero-scores {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    order: -1;
}

.vpncheck-hero .hero-score-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10rem;
    padding: 0.5rem 1.25rem;
    padding-left: 0.5rem;
    min-width: 260px;
}

.vpncheck-hero .hero-score-card .score-ring {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.vpncheck-hero .hero-score-card .score-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.vpncheck-hero .hero-score-card .score-track {
    stroke: rgba(255, 255, 255, 0.2);
}

.vpncheck-hero .hero-score-card .score-fill {
    stroke: #16a34a;
    transition: stroke-dashoffset 0.8s ease, stroke 0.3s ease;
    stroke-dasharray: 264 264;
    stroke-dashoffset: 264;
}

.vpncheck-hero .hero-score-card .score-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

.vpncheck-hero .hero-score-card .score-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.vpncheck-hero .hero-score-card .score-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vpncheck-hero .hero-score-card .score-label {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.vpncheck-hero .result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.vpncheck-hero.running:not(.loading) .ring-center {
    transform: scale(1);
    opacity: 1;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--result-color) 60%, transparent), #0000);
}


.vpncheck-hero .result-ip {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.vpncheck-hero .result-message {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 1.5rem;
    opacity: .9;
}

.vpncheck-hero .result-message h2 {
    font-size: 2.75rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    color: inherit;
}

/* Spinner animation */
.vpncheck-hero.loading .ring-spinner {
    transform-origin: 50% 50%;
    animation: vpc-rotate 1.5s linear infinite both, vpc-dasharray 1.5s cubic-bezier(0.42, 0, 0.58, 1) infinite both, vpc-dashoffset 1.5s cubic-bezier(0.42, 0, 0.58, 1) infinite both;
}

.vpncheck-hero.show-result .ring-spinner {
    opacity: 0;
}

.vpncheck-hero.loading .ring-result {
    opacity: 0 !important;
}

.vpncheck-hero.running .ring-result {
    opacity: 1;
}

@keyframes vpc-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes vpc-dasharray {
    0% {
        stroke-dasharray: 0 1000;
    }

    47.5% {
        stroke-dasharray: 459 1000;
    }

    95% {
        stroke-dasharray: 459 1000;
    }

    100% {
        stroke-dasharray: 459 1000;
    }
}

@keyframes vpc-dashoffset {
    0% {
        stroke-dashoffset: 0;
    }

    47.5% {
        stroke-dashoffset: -175;
    }

    95% {
        stroke-dashoffset: -646;
    }

    100% {
        stroke-dashoffset: -646;
    }
}

/* Results Section */
.vpncheck-results.hidden {
    display: none;
}

/* Main Grid */
.vpncheck-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.75rem;
    margin-top: 2rem;
}

/* User Info Card */
.vpncheck-results .user-info-card {
    position: sticky;
    top: 1rem;
    height: fit-content;
}

.vpncheck-results .user-info-card .info-grid {
    grid-template-columns: 1fr;
}

/* Results Card */
.vpncheck-results .results-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Table Styles */
.vpncheck-table-wrapper {
    overflow-x: auto;
}

.vpncheck-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.vpncheck-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #78716c;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    background: #f9f9f9;
    --border-radius: 16px;
}

.vpncheck-table thead th:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.vpncheck-table thead th:last-child {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.vpncheck-table td {
    padding: 1rem;
    border-bottom: 1px dashed #d1d5db;
    font-size: 1rem;
    font-weight: 600;
    color: #111;
}

.vpncheck-table tbody tr:hover {
    background: #f9fafb;
}

.vpncheck-table tbody tr:last-child td {
    border-bottom: none;
}

.vpncheck-table td.status-pass,
.vpncheck-table td.status-fail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vpncheck-table td.status-pass {
    color: #16a34a;
}

.vpncheck-table td.status-fail {
    color: #dc2626;
}

.vpncheck-table td img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Extra Info Grid */
.vpncheck-extra-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.extra-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.extra-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.extra-header svg {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
}

.extra-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}

.extra-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.extra-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.extra-row span {
    color: #6b7280;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.extra-row strong {
    color: #111;
    font-size: 0.875rem;
    text-align: right;
    word-break: break-all;
}

.no-data {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.875rem;
}

/* More Info Button in Hero */
.vpncheck-hero .more-info-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.vpncheck-hero.show-result .more-info-btn {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vpncheck-hero {
        height: 650px;
    }

    .vpncheck-hero .hero-title {
        font-size: 2rem;
    }

    .vpncheck-hero.running .hero-initial {
        transform: translateY(-200px);
    }

    .vpncheck-hero .hero-progress {
        justify-content: center;
    }

    .vpncheck-hero .hero-scores {
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }

    .vpncheck-hero .hero-score-card {
        min-width: auto;
        width: 100%;
        padding: 0.4rem 0.75rem;
        padding-left: 0.4rem;
        gap: 0.4rem;
    }

    .vpncheck-hero .hero-score-card .score-ring {
        width: 40px;
        height: 40px;
    }

    .vpncheck-hero .hero-score-card .score-value {
        font-size: 0.9rem;
    }

    .vpncheck-hero .hero-score-card .score-title {
        font-size: 0.75rem;
    }

    .vpncheck-hero .hero-score-card .score-label {
        font-size: 0.85rem;
    }

    .vpncheck-hero .result-ip {
        word-wrap: anywhere;
        font-size: 1rem;
    }

    .vpncheck-hero .result-message h2 {
        font-size: 2rem;
    }

    .vpncheck-hero .result-message {
        font-size: 1.25rem;
        gap: 1rem;
    }

    /* Main grid */
    .vpncheck-grid {
        grid-template-columns: 1fr;
    }

    .vpncheck-results .user-info-card {
        position: static;
    }

    /* Extra grid */
    .vpncheck-extra-grid {
        grid-template-columns: 1fr;
    }

    /* Table on mobile - keep flex layout */
    .vpncheck-table th,
    .vpncheck-table td {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .vpncheck-table th:first-child,
    .vpncheck-table td:first-child {
        padding-left: 0.5rem;
    }

    .vpncheck-table th:last-child,
    .vpncheck-table td:last-child {
        padding-right: 0.5rem;
    }
}