/* DISC 性格测试 - 移动端样式 */
:root {
    --primary-color: #1C8C9F;
    --primary-light: #E8F4F6;
    --primary-dark: #167080;
    --success-color: #52C41A;
    --warning-color: #FAAD14;
    --error-color: #FF4D4F;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #E8E8E8;
    --background: #F5F7FA;
    --card-bg: #FFFFFF;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
}

.app-container {
    min-height: 100%;
    max-width: 750px;
    margin: 0 auto;
    background-color: var(--background);
}

/* 通用容器 */
.container {
    padding: 20px 16px;
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 16px;
    margin-bottom: 12px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 44px;
}

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

.btn-primary:active {
    background-color: var(--primary-dark);
    transform: scale(0.98);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* 进度条 */
.progress-bar {
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    text-align: right;
}

/* 选项卡片 */
.option-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.option-card:active {
    transform: scale(0.98);
}

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

.option-card .option-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    margin-right: 12px;
}

.option-card.selected .option-number {
    background-color: var(--primary-color);
    color: white;
}

.option-card .option-content {
    flex: 1;
}

.option-card .option-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.option-card .option-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 首页样式 */
.home-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    text-align: center;
}

.home-page .logo {
    font-size: 48px;
    margin-bottom: 20px;
}

.home-page h1 {
    font-size: 24px;
    margin-bottom: 12px;
}

.home-page .subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* 答题页面 */
.test-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.test-header {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    padding: 16px;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.test-content {
    flex: 1;
    padding: 16px;
}

.test-footer {
    position: sticky;
    bottom: 0;
    background: var(--card-bg);
    padding: 16px;
    display: flex;
    gap: 12px;
    box-shadow: 0 -1px 4px rgba(0,0,0,0.05);
}

.test-footer .btn {
    flex: 1;
}

.question-number {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.question-content {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* 结果页面 */
.result-page {
    padding: 20px 16px;
}

.result-header {
    text-align: center;
    padding: 30px 0;
}

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

.result-header h1 {
    font-size: 20px;
    margin-bottom: 8px;
}

.result-header .type {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
}

.score-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.score-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.score-item:last-child {
    margin-bottom: 0;
}

.score-label {
    width: 80px;
    font-weight: 500;
}

.score-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin: 0 12px;
    overflow: hidden;
}

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

.score-bar-fill.d { background: #E74C3C; }
.score-bar-fill.i { background: #F1C40F; }
.score-bar-fill.s { background: #2ECC71; }
.score-bar-fill.c { background: #3498DB; }

.score-value {
    width: 30px;
    text-align: right;
    font-weight: 600;
}

/* 分析卡片 */
.analysis-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.analysis-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-card p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.analysis-section {
    margin-bottom: 16px;
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.analysis-section h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* 历史记录 */
.history-page {
    padding: 16px;
}

.history-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item .type {
    font-weight: 600;
    margin-bottom: 4px;
}

.history-item .date {
    font-size: 12px;
    color: var(--text-light);
}

.history-item .arrow {
    color: var(--text-light);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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