* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    text-align: center;
    padding: 20px;
}

.main-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 24px 40px;
    max-width: 500px;
    width: 100%;
}

.logo {
    margin-bottom: 20px;
}

.logo img {
    width: 150px;
    height: auto;
}

h1 {
    font-size: 24px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.checkbox-container:hover {
    border-color: #ccc;
    background-color: #f5f5f5;
}

.checkbox-container.disabled {
    pointer-events: none;
}

.checkbox-wrapper {
    position: relative;
    width: 28px;
    height: 28px;
    margin-right: 12px;
}

.checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.2s;
}

.checkbox.checked {
    background: #f5a623;
    border-color: #f5a623;
}

.checkbox.loading {
    border-color: #f5a623;
}

.checkbox svg {
    display: none;
    width: 18px;
    height: 18px;
}

.checkbox.checked svg {
    display: block;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #f5a623;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.checkbox.loading .spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.checkbox-label {
    font-size: 14px;
    color: #333;
    user-select: none;
}

.branding {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.branding span {
    font-size: 10px;
    color: #666;
}

.privacy-links {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.privacy-links a {
    color: #666;
    font-size: 11px;
    text-decoration: none;
}

.privacy-links a:hover {
    text-decoration: underline;
}

.footer {
    margin-top: 16px;
    font-size: 12px;
    color: #999;
}

.ray-id {
    font-family: monospace;
    font-size: 11px;
    color: #999;
    margin-top: 8px;
}

.success-message {
    display: none;
    color: #2ecc71;
    font-size: 14px;
    margin-top: 16px;
}

.success-message.show {
    display: block;
}

@media (max-width: 480px) {
    .main-wrapper {
        padding: 20px;
        margin: 10px;
    }

    .branding {
        display: none;
    }
}

/* Popover Styles */
.popover-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.popover-overlay.show {
    display: flex;
    opacity: 1;
}

.popover {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 320px;
    transform: scale(0.95) translateY(-10px);
    transition: transform 0.2s ease;
    overflow: hidden;
    position: relative;
}

.popover-overlay.show .popover {
    transform: scale(1) translateY(0);
}

.popover-arrow {
    position: absolute;
    top: -8px;
    left: 24px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

.popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.popover-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.shield-icon {
    width: 20px;
    height: 20px;
}

.popover-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #999;
    transition: all 0.15s;
}

.popover-close:hover {
    background: #f5f5f5;
    color: #666;
}

.popover-close svg {
    width: 16px;
    height: 16px;
}

.popover-body {
    padding: 16px;
}

.challenge-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #fff8e6 0%, #fff4d6 100%);
    border: 1px solid #f5a623;
    border-radius: 6px;
    margin-bottom: 16px;
}

.challenge-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(245, 166, 35, 0.2);
}

.challenge-icon svg {
    width: 20px;
    height: 20px;
}

.challenge-text p {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 2px 0;
}

.challenge-hint {
    font-size: 11px;
    color: #f5a623;
    font-weight: 500;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 12px;
    color: #555;
    transition: all 0.15s;
}

.step:hover {
    background: #f0f1f2;
}

.step-icon {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.step-icon svg {
    width: 16px;
    height: 16px;
    color: #666;
}

.step-icon.windows-icon svg {
    width: 18px;
    height: 18px;
}

.step-icon.enter-icon svg {
    color: #f5a623;
}

.step strong {
    color: #333;
}

.popover-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
}

.verify-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f5a623 0%, #f7931e 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3);
}

.verify-btn:hover {
    background: linear-gradient(135deg, #e6951a 0%, #e8860f 100%);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.4);
    transform: translateY(-1px);
}

.verify-btn:active {
    transform: translateY(0);
}

.verify-btn svg {
    width: 16px;
    height: 16px;
}

.popover-branding {
    padding: 8px 16px;
    background: #fafafa;
    text-align: center;
    font-size: 10px;
    color: #999;
    border-top: 1px solid #eee;
}

.popover-branding strong {
    color: #666;
    margin-left: 4px;
}

@media (max-width: 480px) {
    .popover {
        width: calc(100% - 40px);
        max-width: 320px;
    }

    .popover-arrow {
        display: none;
    }
}
