/* style.css —— 独立样式文件 */
:root {
    --primary: #5f6cff;
    --primary-light: #8a94ff;
    --primary-dark: #3a45c0;
    --bg-dark: #0b0e14;
    --bg-card: rgba(18, 25, 40, 0.75);
    --glass-edge: rgba(255, 255, 255, 0.08);
    --text-main: #f0f3ff;
    --text-dim: #a6b4d9;
    --success: #2dd4bf;
    --error: #ff8a7a;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(100, 150, 255, 0.1);
    --transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif;
}

body {
    background: radial-gradient(circle at 20% 30%, #141b2b, #03060b);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    padding: 16px;
}

/* 背景动画层 */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at 50% 50%, rgba(95, 108, 255, 0.15), transparent 70%);
    animation: floatGlow 12s infinite alternate ease-in-out;
}

.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: 
        radial-gradient(2px 2px at 15% 25%, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 75% 60%, rgba(200,220,255,0.15), transparent),
        radial-gradient(4px 4px at 30% 80%, rgba(150,180,255,0.1), transparent),
        radial-gradient(3px 3px at 85% 15%, rgba(255,255,255,0.2), transparent);
    background-size: 200px 200px;
    animation: drift 24s infinite linear;
}

@keyframes floatGlow {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.15); }
}
@keyframes drift {
    0% { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}

.app-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 主卡片 */
.verification-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 40px;
    padding: 28px 24px 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-edge);
    transition: var(--transition);
    animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 屏幕切换 */
.screen {
    display: none;
    flex-direction: column;
    gap: 24px;
}

.active-screen {
    display: flex;
}

/* 开始屏幕 */
.logo-symbol {
    color: var(--primary-light);
    margin: 0 auto 8px;
}

.title-main {
    font-size: 2.4rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff, #b0c8ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
}

.hint-text {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 60px;
    padding: 16px 24px;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(95, 108, 255, 0.3);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
    width: 100%;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 28px rgba(95, 108, 255, 0.5);
}

.pulse-animation {
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(95, 108, 255, 0.6); }
    70% { box-shadow: 0 0 0 16px rgba(95, 108, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(95, 108, 255, 0); }
}

.secure-badge {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    opacity: 0.8;
}

/* 进度条 */
.progress-section {
    margin-bottom: 8px;
}

.level-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-bar-container {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* 问题面板 */
.glass-panel {
    background: rgba(20, 30, 50, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 28px;
    padding: 24px 20px;
    border: 1px solid var(--glass-edge);
}

.ai-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.ai-icon {
    font-size: 20px;
}

.ai-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-light);
    font-weight: 500;
}

.question-text {
    font-size: 1.7rem;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-word;
}

/* 选项 */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 16px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 18px 20px;
    text-align: left;
    font-size: 1.2rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 16px;
}

.option-btn .prefix {
    font-weight: 700;
    color: var(--primary-light);
    min-width: 28px;
}

.option-btn.selected {
    background: rgba(95, 108, 255, 0.25);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(95, 108, 255, 0.3);
}

.option-btn:active {
    transform: scale(0.99);
}

/* 按钮区域 */
.action-area {
    margin-top: 8px;
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-edge);
    border-radius: 60px;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.btn-secondary:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: transparent;
}

.error-message {
    min-height: 28px;
    margin-top: 12px;
    color: var(--error);
    text-align: center;
    font-size: 0.9rem;
}

.reset-link {
    text-align: center;
    margin-top: 8px;
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 8px;
}

/* 结果屏幕 */
.success-checkmark {
    color: var(--success);
    margin: 0 auto;
}

.result-title {
    font-size: 2rem;
    text-align: center;
}

.result-sub {
    text-align: center;
    color: var(--text-dim);
}

.password-card {
    background: rgba(0,0,0,0.2);
    border-radius: 24px;
    padding: 20px;
    border: 1px dashed var(--primary-light);
    margin: 16px 0;
}

.password-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.password-value-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.password-value {
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.copy-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 40px;
    padding: 10px 16px;
    font-size: 1.2rem;
    cursor: pointer;
}

.secure-note {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
}

.app-footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.75rem;
    opacity: 0.7;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .verification-card { padding: 20px 16px; }
    .question-text { font-size: 1.4rem; }
    .option-btn { padding: 14px 16px; font-size: 1rem; }
}