:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --primary-color: #d1b48c; /* 类似原神的UI金/砂色 */
    --text-main: #333333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    
    /* 关键修改：允许 body 随内容撑开，最少是一个屏幕的高度 */
    min-height: 100vh; 
    display: flex;
    /* 给上下左右留一点呼吸空间，防止内容长的时候紧贴着屏幕边缘 */
    padding: 40px 20px; 
    box-sizing: border-box;
}

.app-container {
    background-color: var(--card-bg);
    width: 100%; /* 改成 100%，配合外层 padding 更适配手机端 */
    max-width: 600px;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    
    /* 关键修改：这是 flex 布局下最完美的居中方式，且不会导致顶部被截断 */
    margin: auto; 
}

/* 屏幕切换逻辑 */
.screen { display: none; opacity: 0; transition: opacity 0.5s ease; }
.screen.active { display: block; opacity: 1; }

.progress-bar {
    width: 100%; height: 8px; background: #eee; border-radius: 4px; margin-bottom: 20px;
}
#progress-fill {
    height: 100%; background: var(--primary-color); border-radius: 4px; width: 0%;
    transition: width 0.3s ease;
}

#question-text { font-size: 1.2rem; margin-bottom: 30px; color: var(--text-main); min-height: 60px;}

.options-grid { display: flex; flex-direction: column; gap: 10px; }

.option-btn {
    padding: 15px; border: 2px solid #eee; border-radius: 8px; background: white;
    font-size: 1rem; cursor: pointer; transition: all 0.2s ease;
}
.option-btn:hover {
    border-color: var(--primary-color); background: #fdfaf6; transform: translateY(-2px);
}

.character-card {
    padding: 20px; border: 2px solid var(--primary-color); border-radius: 12px; margin: 20px 0;
}
#char-name { color: var(--primary-color); font-size: 2rem; margin-bottom: 10px; }

.restart-btn {
    padding: 10px 30px; background: var(--primary-color); color: white;
    border: none; border-radius: 20px; cursor: pointer; font-size: 1rem;
}
/* 新增的图表容器样式 */
.chart-container {
    width: 100%;
    max-width: 400px;
    height: 350px;
    margin: 20px auto;
    position: relative;
}
/* 个性化留言板样式 */
.report-box {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(240, 242, 245, 0.6);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

.report-intro, .report-outro {
    font-weight: bold;
    color: #555;
    margin-bottom: 15px;
}

.report-list {
    padding-left: 20px;
    margin-bottom: 15px;
}

.report-list li {
    margin-bottom: 10px;
}
/* 📱 移动端专属适配 */
@media (max-width: 480px) {
    .app-container {
        padding: 20px 15px; /* 减小手机端卡片的内边距 */
    }
    
    #question-text { 
        font-size: 1.1rem; 
        margin-bottom: 20px;
    }
    
    .option-btn { 
        padding: 12px; 
        font-size: 0.95rem; 
    }
    
    .chart-container { 
        height: 280px; /* 手机上雷达图稍微压扁一点，防止占满全屏 */
        margin: 10px auto;
    }
    
    #char-name {
        font-size: 1.6rem;
    }
    
    .report-box {
        font-size: 0.9rem;
        padding: 15px;
    }
}