/* AI认知度测试系统 - OpenAI纯黑简约风格 */

/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #10A37F;
    --primary-hover: #0D8B6A;
    --bg: #000000;
    --bg-card: #1A1A1A;
    --bg-card-hover: #242424;
    --text: #FFFFFF;
    --text-secondary: #ABABAB;
    --text-light: #6B6B6B;
    --border: #333333;
    --border-light: #444444;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    --radius: 12px;
}

html { 
    background: #000000;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #000000;
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 520px;
    margin: 0 auto;
    padding: 10px;
}

/* ==================== 通用组件 ==================== */
h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
h3 { font-size: 1rem; font-weight: 600; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { 
    background: var(--primary-hover);
}
.btn-primary:disabled { 
    background: #333333; 
    cursor: not-allowed;
    color: #666;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover { 
    background: var(--bg-card);
    border-color: #555;
}

.btn-wechat { background: #07C160; color: white; }
.btn-wechat:hover { background: #06AD56; }
.btn-alipay { background: #1677FF; color: white; }
.btn-alipay:hover { background: #1366E8; }
.btn-guest { background: #333333; color: white; }
.btn-guest:hover { background: #444444; }

.btn-nav {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 0.9rem;
}
.btn-nav:hover { color: var(--text); background: var(--bg-card); }
.btn-nav:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-small {
    background: var(--bg-card);
    color: var(--text);
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.btn-large { padding: 16px 32px; font-size: 1rem; }

/* ==================== 卡片 ==================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.page-header {
    text-align: center;
    padding: 16px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.page-header h1 {
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}
.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================== 首页 ==================== */
.auth-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.auth-card h3 {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-card .btn {
    width: 100%;
}
.auth-divider {
    text-align: center;
    color: var(--text-light);
    margin: 20px 0;
    font-size: 0.9rem;
}

/* ==================== 题目卡片 ==================== */
.question-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.question-number {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.question-content {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.7;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}
.option:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}
.option.selected {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}
.option-key {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2A2A2A;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.option.selected .option-key {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.option-text {
    font-size: 0.95rem;
}

/* ==================== 进度条 ==================== */
.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px 0;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}
.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ==================== 导航按钮 ==================== */
.question-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

/* ==================== 答题卡 ==================== */
.answer-sheet {
    margin-top: 16px;
    text-align: center;
}
.answer-sheet-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.answer-sheet-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 360px;
    width: 90%;
    border: 1px solid var(--border);
}
.answer-sheet-content h3 {
    margin-bottom: 16px;
}
.answer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.answer-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2A2A2A;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
}
.answer-num.answered {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.answer-num.current {
    background: #333;
    color: white;
    border-color: var(--primary);
}
.btn-close {
    width: 100%;
    padding: 12px;
    background: #2A2A2A;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text);
    font-size: 0.95rem;
}

/* ==================== 测试页面 ==================== */
.test-header {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}
.timer {
    font-weight: 600;
    color: var(--primary);
}
.timer.warning {
    color: #EF4444;
}

.main-content {
    padding-bottom: 12px;
}

/* ==================== 报告页面 ==================== */
.result-header {
    text-align: center;
    padding: 14px 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.result-badge {
    display: inline-block;
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}
.level-0 { background: #22C55E; }
.level-1 { background: #84CC16; }
.level-2 { background: #EAB308; }
.level-3 { background: #F97316; }
.level-4 { background: #EF4444; }
.level-5 { background: #8B5CF6; }
.level-bronze { background: #CD7F32; }
.level-silver { background: #C0C0C0; }
.level-gold { background: #FFD700; }

.score-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.score-card {
    background: var(--bg-card);
    padding: 20px 16px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.score-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}
.score-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

.report-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.category-item {
    margin-bottom: 14px;
}
.category-item:last-child { margin-bottom: 0; }
.category-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 6px;
}
.category-bar {
    height: 6px;
    background: #2A2A2A;
    border-radius: 3px;
    overflow: hidden;
}
.category-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}

.strengths-list, .weaknesses-list, .recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.strength-item, .weakness-item, .recommendation-item {
    padding: 12px 14px;
    background: #1A1A1A;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
}
.strength-item {
    background: rgba(16, 163, 127, 0.15);
    color: #10A37F;
    border-color: rgba(16, 163, 127, 0.3);
}
.weakness-item {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.recommendation-item {
    background: rgba(234, 179, 8, 0.15);
    color: #EAB308;
    border-color: rgba(234, 179, 8, 0.3);
}

.career-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
    background: #1A1A1A;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}
.career-name { font-weight: 500; }
.career-match {
    color: var(--primary);
    font-weight: 600;
}

.empty-text {
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: center;
    padding: 16px;
}

/* ==================== 分享 ==================== */
.share-btn {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 14px 36px;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(16, 163, 127, 0.4);
}

/* ==================== 模态框 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    position: relative;
}
.modal h3 {
    margin-bottom: 16px;
    text-align: center;
}
.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.modal-buttons .btn {
    flex: 1;
}

/* 关闭按钮 */
.close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    background: none;
    border: none;
}
.close:hover {
    color: var(--text);
}

/* ==================== 响应式 ==================== */
@media (max-width: 480px) {
    .container { padding: 12px; }
    h1 { font-size: 1.4rem; }
    .score-section { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .score-value { font-size: 1.3rem; }
}

.share-card {
    background: #1A1A1A;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
    border: 1px solid #333;
}
.share-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(16, 163, 127, 0.2);
    color: #10A37F;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.share-badge.level-bronze {
    background: rgba(205, 127, 50, 0.2);
    color: #CD7F32;
}
.share-badge.level-silver {
    background: rgba(192, 192, 192, 0.2);
    color: #C0C0C0;
}
.share-badge.level-gold {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

/* ==================== 响应式 ==================== */
@media (max-width: 480px) {
    .container { padding: 12px; }
    h1 { font-size: 1.3rem; }
    .score-section { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .score-value { font-size: 1.2rem; }
}
