@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    --bg-page: #020617;
    --bg-surface: rgba(15, 23, 42, 0.78);
    --bg-surface-soft: rgba(15, 23, 42, 0.58);
    --bg-nested: rgba(15, 23, 42, 0.62);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border-soft: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.13);

    --accent-red: #b91c1c;
    --accent-red-dark: #7f1d1d;

    --shadow-panel: 0 28px 68px rgba(2, 6, 23, 0.34);
    --shadow-soft: 0 18px 40px rgba(2, 6, 23, 0.26);
    --shadow-red: 0 16px 36px rgba(127, 29, 29, 0.28);

    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 30px;
    --radius-pill: 999px;

    --transition: 220ms ease;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    position: relative;
    overflow-x: hidden;
    padding: 2.5rem 1rem;
    display: grid;
    place-items: center;
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-primary);
    background:
        radial-gradient(circle at 14% 18%, rgba(59, 130, 246, 0.18), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(148, 163, 184, 0.12), transparent 24%),
        radial-gradient(circle at 50% 86%, rgba(59, 130, 246, 0.12), transparent 34%),
        linear-gradient(180deg, #020617 0%, #030712 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.26), transparent 88%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 22% 72%, rgba(59, 130, 246, 0.14), transparent 24%),
        radial-gradient(circle at 78% 76%, rgba(71, 85, 105, 0.2), transparent 24%);
    filter: blur(34px);
    pointer-events: none;
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.error-container {
    position: relative;
    z-index: 1;
    width: min(100%, 720px);
    text-align: center;
}

.challenge-container {
    width: min(100%, 640px);
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.9rem;
}

.logo {
    height: 56px;
    width: auto;
    filter: drop-shadow(0 12px 26px rgba(2, 6, 23, 0.32));
}

.error-card,
.challenge-card {
    position: relative;
    overflow: hidden;
    padding: 2.3rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-soft);
    background: linear-gradient(180deg, var(--bg-surface), var(--bg-surface-soft));
    box-shadow: var(--shadow-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: slide-up 0.45s ease;
}

.error-card::before,
.challenge-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.11), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 20%);
    pointer-events: none;
}

.error-card::after,
.challenge-card::after {
    content: "";
    position: absolute;
    left: 1.6rem;
    right: 1.6rem;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    pointer-events: none;
}

.blocked {
    border-color: var(--border-strong);
}

.error-icon,
.lock-icon,
.forbidden-icon,
.notfound-icon,
.rate-icon,
.shield-icon,
.country-icon,
.captcha-icon,
.js-icon,
.success-icon {
    --icon-border: rgba(185, 28, 28, 0.36);
    --icon-ambient: rgba(127, 29, 29, 0.22);
    width: 84px;
    height: 84px;
    margin: 0 auto 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 24px;
    border: 1px solid var(--icon-border);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.74));
    box-shadow: var(--shadow-soft);
}

.error-icon::before,
.lock-icon::before,
.forbidden-icon::before,
.notfound-icon::before,
.rate-icon::before,
.shield-icon::before,
.country-icon::before,
.captcha-icon::before,
.js-icon::before,
.success-icon::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 18px;
    background: radial-gradient(circle at top, var(--icon-ambient), transparent 72%);
}

.error-icon svg,
.lock-icon svg,
.forbidden-icon svg,
.notfound-icon svg,
.rate-icon svg,
.shield-icon svg,
.country-icon svg,
.captcha-icon svg,
.js-icon svg,
.success-icon svg {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 2;
}

.error-icon,
.forbidden-icon {
    --icon-border: rgba(185, 28, 28, 0.4);
    --icon-ambient: rgba(127, 29, 29, 0.24);
}

.notfound-icon,
.shield-icon,
.country-icon,
.captcha-icon {
    --icon-border: rgba(96, 165, 250, 0.32);
    --icon-ambient: rgba(30, 64, 175, 0.18);
}

.lock-icon,
.rate-icon,
.js-icon,
.warning-icon {
    --icon-border: rgba(245, 158, 11, 0.32);
    --icon-ambient: rgba(146, 64, 14, 0.2);
}

.success-icon {
    --icon-border: rgba(34, 197, 94, 0.32);
    --icon-ambient: rgba(22, 101, 52, 0.2);
}

.warning-icon {
    box-shadow: var(--shadow-soft);
}

.error-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    margin-bottom: 1.15rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(185, 28, 28, 0.7);
    background: rgba(127, 29, 29, 0.22);
    color: #fecaca;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.error-code-blue {
    border-color: rgba(96, 165, 250, 0.46);
    background: rgba(30, 64, 175, 0.2);
    color: #dbeafe;
}

.error-code-amber {
    border-color: rgba(245, 158, 11, 0.46);
    background: rgba(146, 64, 14, 0.2);
    color: #fde68a;
}

.error-title,
.challenge-title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.error-description,
.challenge-description {
    margin: 0 0 1.55rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.technical-details,
.search-suggestion,
.cooldown-timer,
.location-info,
.captcha-container,
.cloudflare-error-box,
.code-animation,
.ray-id {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.technical-details,
.search-suggestion,
.cooldown-timer,
.location-info,
.captcha-container,
.cloudflare-error-box,
.code-animation {
    margin: 0 0 1.5rem;
    padding: 1.1rem 1.15rem;
    text-align: left;
}

.technical-details h4 {
    margin: 0 0 0.95rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.72rem 0;
}

.detail-row + .detail-row {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-value {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.detail-value-url {
    word-break: break-all;
    font-size: 0.75rem;
}

.detail-value-good {
    color: #4ade80;
}

.detail-value-bad {
    color: #f87171;
}

.search-suggestion p {
    margin: 0 0 0.8rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-suggestion ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.search-suggestion li {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-suggestion li::before {
    content: "";
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.55rem;
    border-radius: 999px;
    background: rgba(185, 28, 28, 0.82);
    vertical-align: middle;
}

.cooldown-timer {
    text-align: center;
}

.timer-label {
    margin-bottom: 0.45rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.timer-value {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    color: #fb7185;
    font-size: 2rem;
    font-weight: 700;
}

.location-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

.location-info svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
}

.location-info span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.captcha-container,
.cloudflare-error-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    text-align: center;
}

.captcha-container > *,
.cloudflare-error-box > * {
    max-width: 100%;
}

.progress-container {
    height: 10px;
    margin: 0 0 1.25rem;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.progress-bar {
    height: 100%;
    width: 62%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7f1d1d, #b91c1c, #60a5fa);
    animation: progress-fill 3s ease-in-out infinite;
}

.status-message {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
    animation: dot-pulse 1.6s ease-in-out infinite;
}

.status-dot-blue {
    background: #60a5fa;
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.12);
}

.status-dot-amber {
    background: #fbbf24;
    box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.12);
}

.button-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.82rem 1.35rem;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    color: #fff;
    border-color: rgba(185, 28, 28, 0.72);
    background: linear-gradient(180deg, #991b1b, #7f1d1d);
    box-shadow: var(--shadow-red);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #b91c1c, #7f1d1d);
}

.btn-secondary {
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.48);
}

.btn-secondary:hover {
    color: #fca5a5;
    border-color: rgba(185, 28, 28, 0.5);
    background: rgba(127, 29, 29, 0.14);
}

.footer {
    margin-top: 1.3rem;
    text-align: center;
}

.footer-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-text a {
    color: var(--text-secondary);
}

.footer-text a:hover {
    color: #fca5a5;
}

.ray-id {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.95rem;
    padding: 0.58rem 0.85rem;
}

.ray-id-label {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.ray-id-value {
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.turnstile-container {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0;
    min-height: 65px;
}

.code-animation {
    color: var(--text-muted);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
}

.code-animation::after {
    content: "";
    animation: typing-status 2s steps(1) infinite;
}

@keyframes progress-fill {
    0% {
        width: 0%;
    }

    50% {
        width: 68%;
    }

    100% {
        width: 100%;
    }
}

@keyframes dot-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing-status {
    0% {
        content: "Checking browser...";
    }

    25% {
        content: "Validating request...";
    }

    50% {
        content: "Running security checks...";
    }

    75% {
        content: "Verifying integrity...";
    }

    100% {
        content: "Processing...";
    }
}

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

    .error-card,
    .challenge-card {
        padding: 1.65rem 1.2rem;
        border-radius: 24px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .captcha-container,
    .cloudflare-error-box {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }
}
