/* Custom Cloudflare-style Captcha Modal */
.captcha-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.captcha-modal-content {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.captcha-modal-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #000000;
    font-weight: 700;
}

.captcha-modal-content p {
    color: #666666;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.captcha-note {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #999999;
}

/* Custom Cloudflare-style Captcha */
.custom-captcha-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.custom-captcha {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #d1d5db;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    min-width: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-captcha:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.custom-captcha.captcha-loading {
    border-color: #6366f1;
    background: linear-gradient(135deg, #eef2ff 0%, #f8f9fa 100%);
}

.custom-captcha.captcha-verified {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #f0fdf4 100%);
    cursor: default;
}

.captcha-checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #9ca3af;
    border-radius: 3px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.custom-captcha:hover .captcha-checkbox {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.captcha-checkbox.captcha-checked {
    background-color: #10b981;
    border-color: #10b981;
}

.captcha-spinner {
    display: none;
    color: #6366f1;
    width: 20px;
    height: 20px;
}

.captcha-checkbox.captcha-loading .captcha-spinner {
    display: block;
    animation: spinnerRotate 1s linear infinite;
}

.captcha-checkbox.captcha-loading .captcha-checkmark {
    display: none;
}

.captcha-spinner svg {
    width: 100%;
    height: 100%;
}

.captcha-checkmark {
    display: none;
    color: white;
}

.captcha-checkbox.captcha-checked .captcha-checkmark {
    display: block;
    animation: checkmarkAppear 0.3s ease;
}

.captcha-checkbox.captcha-checked .captcha-spinner {
    display: none;
}

@keyframes spinnerRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.captcha-spinner .spinner-circle {
    animation: spinnerDash 1.5s ease-in-out infinite;
}

@keyframes spinnerDash {
    0% {
        stroke-dashoffset: 40;
    }
    50% {
        stroke-dashoffset: 10;
    }
    100% {
        stroke-dashoffset: 40;
    }
}

@keyframes checkmarkAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.captcha-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    flex: 1;
}

.captcha-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.2;
}

.captcha-brand {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.captcha-brand::before {
    content: "🛡️";
    font-size: 0.7rem;
}

.custom-captcha.captcha-loading .captcha-checkbox {
    border-color: #6366f1;
    background-color: #ffffff;
}

@keyframes captchaLoading {
    0%, 100% {
        border-color: #6366f1;
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        border-color: #6366f1;
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    }
}

/* BSOD Fullscreen Modal */
.bsod-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0078d4;
    z-index: 20000;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ffffff;
    overflow: hidden;
}

.bsod-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
}

.bsod-face {
    font-size: 8rem;
    font-weight: normal;
    margin: 2rem 0 1rem 0;
    line-height: 1;
}

.bsod-message {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.bsod-instructions {
    font-size: 1.25rem;
    margin: 2rem 0;
    padding-left: 2rem;
    line-height: 1.8;
}

.bsod-instructions li {
    margin-bottom: 1rem;
}

.windows-key {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    margin: 0 0.25rem;
}

.bsod-info {
    margin: 2rem 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.bsod-info p {
    margin-bottom: 0.5rem;
}

.bsod-stop-code {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}
