/* ========== 全局样式 ========== */
:root {
    /* 8 个模型主题色 - 后续可调整 */
    --chatgpt-color: #8B5CF6;  /* 紫色 */
    --claude-color: #3B82F6;   /* 蓝色 */
    --deepseek-color: #10B981; /* 绿色 */
    --kimi-color: #F97316;     /* 橙色 */
    --doubao-color: #EF4444;   /* 红色 */
    --qwen-color: #F59E0B;     /* 黄色 */
    --zhipu-color: #6B7280;    /* 灰色 */
    --gemini-color: #06B6D4;   /* 青色 */
    
    /* 通用色 - 主色调改为龙虾橙 */
    --primary: #FF6B35;
    --primary-dark: #E85D2A;
    --primary-light: #FF8C61;
    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --bg-light: #F9FAFB;
    --white: #FFFFFF;
    --border: #E5E7EB;
    
    /* 渐变 - 龙虾橙色系 */
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #FF8C61 100%);
    --gradient-bg: linear-gradient(180deg, #FFF5F0 0%, #FFFFFF 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== 页面切换 ========== */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 首页 ========== */
.disclaimer {
    background: linear-gradient(135deg, #FFF5F0 0%, #FFE8DC 100%);
    border: 1px solid #FFD4C4;
    border-radius: 8px;
    padding: 15px 25px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.1);
}

.disclaimer-line1,
.disclaimer-line2 {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #C95A2E;
    margin: 4px 0;
}

.disclaimer-line1 {
    font-weight: 500;
}

.disclaimer-line2 {
    font-weight: 400;
    opacity: 0.9;
}

.disclaimer-line2 a {
    color: #FF6B35;
    text-decoration: none;
    font-weight: 600;
}

.disclaimer-line2 a:hover {
    text-decoration: underline;
    color: #E85D2A;
}

.hero {
    text-align: center;
    padding: 60px 20px 40px;
}

.hero-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
    object-fit: contain;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-english {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.hero-fullname {
    font-size: 0.95rem;
    color: var(--text-gray);
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 40px;
}

/* 介绍卡片 */
.intro-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.intro-card {
    background: var(--white);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.intro-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.intro-card p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* 开始按钮 */
.start-section {
    text-align: center;
    padding: 20px;
}

.start-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 18px 60px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

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

.hint {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* ========== 答题页 ========== */
.quiz-header {
    padding: 20px 0;
    margin-bottom: 30px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 5%;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-gray);
    min-width: 60px;
    text-align: right;
}

/* 题目卡片 */
.question-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* 选项 */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.option:hover {
    border-color: var(--primary);
    background: #F5F3FF;
}

.option input[type="radio"] {
    display: none;
}

.option input[type="radio"]:checked + .option-text,
.option input[type="radio"]:checked ~ .option-emoji {
    color: var(--primary-dark);
    font-weight: 600;
}

.option.selected {
    border-color: var(--primary);
    background: #F5F3FF;
}

.option-text {
    flex: 1;
    font-size: 1rem;
}

.option-emoji {
    font-size: 1.5rem;
    margin-left: 10px;
}

/* 导航按钮 */
.quiz-nav {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.nav-btn {
    flex: 1;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#prev-btn {
    background: var(--bg-light);
    color: var(--text-gray);
}

#prev-btn:not(:disabled) {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

#next-btn {
    background: var(--gradient-primary);
    color: var(--white);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== 结果页 ========== */
.result-header {
    text-align: center;
    padding: 40px 20px;
    background: var(--white);
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.result-title-label {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.result-icon-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-emoji {
    width: 150px;
    height: 150px;
    object-fit: contain;
    display: none; /* 默认隐藏，有图片时显示 */
}

.result-emoji-fallback {
    font-size: 100px;
    display: block; /* 默认显示 emoji */
}

.result-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    display: none; /* 默认隐藏，加载成功后显示 */
    margin: 0 auto 20px; /* 居中 + 下边距 */
}

.result-label {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.result-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-tagline {
    font-size: 1.1rem;
    color: var(--text-gray);
    font-style: italic;
}

/* 结果内容 */
.result-content {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.result-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.result-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.result-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.result-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.result-abilities,
.result-scenarios {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.result-abilities li,
.result-scenarios li {
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.95rem;
}

.result-tips {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.95rem;
    border-left: 4px solid var(--primary);
}

.result-alternatives {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alt-item {
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.95rem;
}

/* 匹配度 */
.result-scores {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.score-label {
    min-width: 80px;
    font-size: 0.9rem;
    font-weight: 600;
}

.score-bar {
    flex: 1;
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.score-value {
    min-width: 40px;
    text-align: right;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 操作按钮 */
.result-actions {
    display: flex;
    gap: 15px;
    padding: 20px;
}

.action-btn {
    flex: 1;
    padding: 16px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn {
    background: var(--gradient-primary);
    color: var(--white);
}

.restart-btn {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ========== 分享弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: var(--text-gray);
    cursor: pointer;
}

.share-card {
    background: linear-gradient(135deg, #F0F9FF 0%, #FFFFFF 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
}

.share-card-header {
    margin-bottom: 15px;
}

.share-emoji {
    font-size: 60px;
    display: none; /* 默认隐藏，有图片时显示 */
    margin-bottom: 10px;
}

.share-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: none; /* 默认隐藏，加载成功后显示 */
    margin: 0 auto 10px;
}

.share-card h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.share-tagline {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 20px;
}

.share-scores {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.share-score-item {
    font-size: 0.85rem;
    padding: 6px 12px;
    background: var(--white);
    border-radius: 6px;
}

.share-qr {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

#qr-placeholder {
    font-size: 0.9rem;
    color: var(--text-gray);
    padding: 20px;
    background: var(--white);
    border-radius: 8px;
}

#qr-placeholder .qr-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

#qr-placeholder .aiti-fullname {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF6B35;
    margin: 10px 0 5px;
    letter-spacing: 2px;
}

#qr-placeholder .aiti-subtitle {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 15px;
}

#qr-placeholder .credit {
    font-size: 0.85rem;
    color: #C95A2E;
    margin-top: 10px;
    font-weight: 500;
}

/* ========== 响应式 ========== */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .hero-logo {
        width: 80px;
        height: 80px;
    }
    
    .hero-english {
        font-size: 2.5rem;
        letter-spacing: 6px;
    }
    
    .question-card {
        padding: 25px;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .result-content {
        padding: 25px;
    }
    
    .result-name {
        font-size: 2rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .intro-cards {
        grid-template-columns: 1fr;
    }
}
