/* ===== 小红书风格 CSS ===== */
/* 基础变量 */
:root {
    --primary-color: #FF2442; /* 小红书红 */
    --primary-light: #FFF0F2;
    --primary-dark: #E61E3A;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-color: #F8F8F8;
    --card-bg: #FFFFFF;
    --border-color: #E5E5E5;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF8F0 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* 布局容器 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 屏幕切换 */
.screen {
    display: none;
    min-height: 100vh;
    padding: 40px 0;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

/* ===== 启动页面 ===== */
.header-card {
    text-align: center;
    margin-bottom: 32px;
}

.icon-wrapper {
    font-size: 64px;
    margin-bottom: 16px;
    animation: bounce 2s infinite;
}

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

.header-card h1 {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-color), #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* 信息卡片网格 */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.info-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.info-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 功能列表 */
.feature-list {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 16px;
}

.feature-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #FF6B6B);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 36, 66, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 36, 66, 0.4);
}

.btn-primary:disabled {
    background: var(--border-color);
    color: var(--text-light);
    cursor: not-allowed;
    box-shadow: none;
}

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

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.tip {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    margin-top: 24px;
}

/* 理论基础卡片 */
.research-basis {
    background: linear-gradient(135deg, #FFF9FA, #FFFFFF);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--primary-light);
}

.research-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.research-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.theory-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.theory-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theory-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.theory-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.theory-content {
    flex: 1;
}

.theory-content strong {
    display: block;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.theory-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 底部占位 */
.bottom-spacer {
    height: 100px;
}

/* 悬浮开始按钮 */
.floating-start-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 80%, transparent);
    backdrop-filter: blur(10px);
    z-index: 100;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.btn-floating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), #FF6B6B);
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 36, 66, 0.4);
    transition: all 0.3s ease;
}

.btn-floating:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 36, 66, 0.5);
}

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

/* ===== 答题页面 ===== */
.progress-bar-wrapper {
    margin-bottom: 32px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #FF6B6B);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* 题目卡片 */
.question-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.question-header {
    margin-bottom: 16px;
}

.question-number {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
}

.question-text {
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
}

/* 选项容器 */
.options-container {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.option-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.option-item.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.option-item.selected .option-radio {
    border-color: var(--primary-color);
}

.option-item.selected .option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.option-label {
    flex: 1;
}

/* 导航提示 */
.nav-hint {
    text-align: center;
    margin-bottom: 16px;
}

.nav-hint p {
    font-size: 14px;
    color: var(--text-light);
}

/* 导航按钮 */
.nav-buttons {
    display: flex;
    justify-content: center;
}

.nav-buttons .btn-secondary {
    min-width: 140px;
}

.nav-buttons .btn-primary,
.nav-buttons .btn-secondary {
    flex: 1;
}

/* ===== 结果页面 ===== */
.result-header {
    text-align: center;
    margin-bottom: 32px;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.result-header h1 {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-color), #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* 分数卡片 */
.score-card {
    background: linear-gradient(135deg, #FFF5F5, #FFFFFF);
    border-radius: var(--radius-xl);
    padding: 40px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
    border: 2px solid var(--primary-light);
}

.score-circle {
    margin-bottom: 24px;
}

.score-value {
    font-size: 64px;
    font-weight: 700;
    color: var(--primary-color);
}

.score-total {
    font-size: 32px;
    color: var(--text-light);
}

.score-label {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.result-level {
    margin-bottom: 16px;
}

.level-badge {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-xl);
    font-size: 18px;
    font-weight: 600;
}

.result-summary {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 维度卡片 */
.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.dimensions-section {
    margin-bottom: 40px;
}

.dimensions-cards {
    display: grid;
    gap: 16px;
}

.dimension-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.dimension-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.dimension-info {
    flex: 1;
}

.dimension-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.dimension-score-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.dimension-score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.dimension-score-text {
    font-size: 14px;
    color: var(--text-light);
}

/* 维度等级颜色 */
.dimension-score-fill.high {
    background: linear-gradient(90deg, #52C41A, #73D13D);
}

.dimension-score-fill.medium {
    background: linear-gradient(90deg, #FAAD14, #FFD666);
}

.dimension-score-fill.low {
    background: linear-gradient(90deg, #FF4D4F, #FF7875);
}

/* 建议部分 */
.advice-section {
    margin-bottom: 40px;
}

.advice-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.advice-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.advice-card h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.advice-card p,
.advice-card li {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.advice-card li {
    margin-bottom: 16px;
}

.advice-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

.advice-card ul {
    padding-left: 0;
    list-style: none;
}

.advice-card ul li {
    position: relative;
    padding-left: 20px;
}

.advice-card ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
    line-height: 1.8;
}

/* 行动按钮 */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.action-buttons .btn-primary,
.action-buttons .btn-outline {
    width: 100%;
}

/* 页脚提示 */
.footer-tip {
    text-align: center;
    padding: 24px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
}

.footer-tip p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.footer-tip p:last-child {
    margin-bottom: 0;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .screen {
        padding: 20px 0;
    }

    .header-card h1 {
        font-size: 24px;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .question-card {
        padding: 24px 16px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .score-value {
        font-size: 48px;
    }

    .score-total {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .option-item {
        padding: 14px 16px;
        font-size: 15px;
    }

    .question-text {
        font-size: 18px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 14px 24px;
        font-size: 16px;
    }
}

/* 动画效果 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dimension-card {
    animation: slideIn 0.4s ease-out;
}

.dimension-card:nth-child(1) { animation-delay: 0.1s; }
.dimension-card:nth-child(2) { animation-delay: 0.2s; }
.dimension-card:nth-child(3) { animation-delay: 0.3s; }
.dimension-card:nth-child(4) { animation-delay: 0.4s; }
.dimension-card:nth-child(5) { animation-delay: 0.5s; }
.dimension-card:nth-child(6) { animation-delay: 0.6s; }
.dimension-card:nth-child(7) { animation-delay: 0.7s; }

/* 打印样式 */
@media print {
    .action-buttons,
    .footer-tip {
        display: none;
    }

    .screen {
        display: block !important;
    }

    body {
        background: white;
    }
}

/* ===== 弹窗样式 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-color);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--border-color);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-tip {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ===== 验证码弹窗样式 ===== */
.code-modal-content {
    max-width: 400px;
}

.code-tip {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 15px;
}

.code-input-container {
    margin-bottom: 16px;
}

.code-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    outline: none;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.code-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 36, 66, 0.1);
}

.code-input::placeholder {
    letter-spacing: normal;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-light);
}

.code-error {
    text-align: center;
    color: #FF4D4F;
    font-size: 14px;
    margin-bottom: 12px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.code-hint {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    margin-top: 16px;
}

/* ===== 图片报告样式 ===== */
.report-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 10px;
}

.report-template {
    width: 375px;
    background: linear-gradient(135deg, #FFF5F5, #FFFFFF);
    border-radius: 16px;
    padding: 28px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.report-header {
    text-align: center;
    margin-bottom: 20px;
}

.report-logo {
    font-size: 42px;
    margin-bottom: 10px;
    line-height: 1;
}

.report-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    line-height: 1.3;
}

.report-header p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.report-score {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.report-score-circle {
    margin-bottom: 10px;
}

.report-score-circle span:first-child {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.report-score-total {
    font-size: 20px;
    color: var(--text-light);
}

.report-level {
    font-size: 14px;
    font-weight: 600;
    color: white;
    padding: 6px 16px;
    border-radius: 16px;
    display: inline-block;
    background: var(--primary-color);
    margin-top: 8px;
}

.report-dimensions {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.report-dimensions h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

#report-dimension-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-dimension-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 8px;
}

.report-dimension-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.report-dimension-info {
    flex: 1;
    min-width: 0;
}

.report-dimension-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    line-height: 1.3;
}

.report-dimension-score {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.3;
}

.report-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.report-footer p {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 3px;
    line-height: 1.4;
}

.report-brand {
    font-size: 13px;
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .modal-content {
        max-width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100%;
    }

    .report-template {
        width: 100%;
        border-radius: 12px;
    }
}
