.scale-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scale-title {
    color: #000 !important;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: bold;
}

.scale-description {
    color: #000 !important;
    margin-bottom: 30px;
    line-height: 1.5;
}

.scale-question {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #ddd;
}

.scale-question-text {
    font-size: 16px;
    margin-bottom: 15px;
    color: #000 !important;
    font-weight: 500;
}

.scale-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.scale-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #000 !important;
    border: 1px solid #ccc;
}

.scale-option:hover {
    background: #e8e8e8;
}

.scale-option input[type="radio"] {
    margin-right: 8px;
}

.scale-submit {
    display: block;
    width: 100%;
    padding: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.scale-submit:hover {
    background: #45a049;
}

.scale-submit:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.scale-reset {
    display: block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #f0f0f0;
    color: #000 !important;
    border: 1px solid #999;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.scale-reset:hover {
    background: #e0e0e0;
}

.scale-result {
    margin-top: 30px;
    padding: 20px;
    background: #e8f5e8;
    border-radius: 6px;
    border-left: 4px solid #4CAF50;
}

.scale-history {
    margin-top: 30px;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 6px;
    border-left: 4px solid #1e90ff;
}

.scale-history h3 {
    color: #000 !important;
    margin-bottom: 15px;
    font-weight: bold;
}

.scale-history-item {
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #ddd;
}

.scale-history-item p {
    margin: 5px 0;
    font-size: 14px;
    color: #000 !important;
}

.scale-history-item strong {
    color: #000 !important;
}

.scale-history-load {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background: #1e90ff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scale-history-load:hover {
    background: #187bcd;
}

.scale-result h3 {
    color: #000 !important;
    margin-bottom: 15px;
    font-weight: bold;
}

.scale-result-score,
.scale-result-interpretation,
.scale-result-suggestion {
    font-size: 16px;
    margin-bottom: 10px;
    color: #000 !important;
}

.scale-result-score .score,
.scale-result-interpretation .interpretation,
.scale-result-suggestion .suggestion {
    font-weight: bold;
    color: #000 !important;
}

.scale-result-note {
    font-size: 14px;
    color: #000 !important;
    font-style: italic;
    margin-top: 20px;
}

.scale-error {
    padding: 20px;
    background: #ffebee;
    border-radius: 6px;
    border-left: 4px solid #f44336;
    color: #000 !important;
    font-weight: bold;
}

/* MBTI 多维度结果样式 */
.mbti-result {
    padding: 20px;
}

.mbti-type-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.mbti-type-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: white !important;
}

.mbti-type-header .type-code {
    font-size: 36px;
    font-weight: bold;
    display: block;
    margin-top: 10px;
    color: #ffd700 !important;
}

.mbti-type-header .type-name {
    margin: 10px 0 0 0;
    font-size: 24px;
    font-weight: 500;
    color: #f0f0f0 !important;
}

.mbti-type-description {
    padding: 20px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mbti-type-description p {
    font-size: 16px;
    line-height: 1.8;
    color: #333 !important;
    margin: 0;
}

.mbti-dimensions {
    margin-top: 30px;
}

.mbti-dimensions h3 {
    color: #000 !important;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}

.mbti-dimension {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mbti-dimension h4 {
    color: #000 !important;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.dimension-bar-container {
    margin: 20px 0;
}

.dimension-pole {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    color: #000 !important;
}

.dimension-pole.left {
    text-align: left;
    color: #4CAF50 !important;
}

.dimension-pole.right {
    text-align: right;
    color: #2196F3 !important;
}

.dimension-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.dimension-bar-left {
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
    height: 100%;
    transition: width 0.5s ease;
}

.dimension-bar-right {
    background: linear-gradient(90deg, #42A5F5 0%, #2196F3 100%);
    height: 100%;
    transition: width 0.5s ease;
}

.dimension-description {
    margin-top: 15px;
    font-size: 14px;
    color: #666 !important;
    font-style: italic;
    text-align: center;
}

/* 移动端适配 - Android & iOS */
@media (max-width: 768px) {
    .scale-container {
        padding: 15px;
        background: #fff;
    }
    
    .scale-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .scale-title {
        color: #000 !important;
        font-weight: bold;
    }
    
    .scale-description {
        color: #000 !important;
    }
    
    .scale-question {
        background: #fff;
        border: 1px solid #ccc;
    }
    
    .scale-question-text {
        color: #000 !important;
        font-weight: 600;
    }
    
    .scale-option {
        color: #000 !important;
        background: #f8f8f8;
        border: 1px solid #bbb;
        padding: 12px 15px;
    }
    
    .scale-result-score,
    .scale-result-interpretation,
    .scale-result-suggestion,
    .scale-result-note {
        color: #000 !important;
    }
    
    .scale-history-item {
        background: #fff;
        border: 1px solid #ccc;
    }
    
    .scale-history-item p {
        color: #000 !important;
    }
    
    .scale-history-item strong {
        color: #000 !important;
    }
    
    /* MBTI 移动端适配 */
    .mbti-type-header h2 {
        font-size: 22px;
    }
    
    .mbti-type-header .type-code {
        font-size: 28px;
    }
    
    .mbti-type-header .type-name {
        font-size: 20px;
    }
    
    .mbti-dimension {
        padding: 15px;
    }
    
    .dimension-bar {
        height: 25px;
    }
    
    .dimension-pole {
        font-size: 14px;
    }
}

/* 强制所有文本为黑色 */
.scale-container * {
    color: #000;
}

.scale-container .scale-submit,
.scale-container .scale-history-load {
    color: white;
}

/* 夜间模式 - 灰白文字，黑色背景 */
@media (prefers-color-scheme: dark) {
    .scale-container {
        background: #000 !important;
    }
    
    .scale-container * {
        color: #e0e0e0 !important;
    }
    
    .scale-title {
        color: #f0f0f0 !important;
    }
    
    .scale-description {
        color: #d0d0d0 !important;
    }
    
    .scale-question {
        background: #1a1a1a !important;
        border: 1px solid #333 !important;
    }
    
    .scale-question-text {
        color: #e0e0e0 !important;
    }
    
    .scale-option {
        background: #2a2a2a !important;
        color: #e0e0e0 !important;
        border: 1px solid #444 !important;
    }
    
    .scale-option:hover {
        background: #3a3a3a !important;
    }
    
    .scale-result {
        background: #1a2a1a !important;
        border-left: 4px solid #4CAF50 !important;
    }
    
    .scale-result h3 {
        color: #f0f0f0 !important;
    }
    
    .scale-result-score,
    .scale-result-interpretation,
    .scale-result-suggestion,
    .scale-result-note {
        color: #e0e0e0 !important;
    }
    
    .scale-result-score .score,
    .scale-result-interpretation .interpretation,
    .scale-result-suggestion .suggestion {
        color: #f0f0f0 !important;
    }
    
    .scale-history {
        background: #1a1a2a !important;
        border-left: 4px solid #1e90ff !important;
    }
    
    .scale-history h3 {
        color: #f0f0f0 !important;
    }
    
    .scale-history-item {
        background: #2a2a3a !important;
        border: 1px solid #444 !important;
    }
    
    .scale-history-item p {
        color: #d0d0d0 !important;
    }
    
    .scale-history-item strong {
        color: #f0f0f0 !important;
    }
    
    .scale-reset {
        background: #2a2a2a !important;
        color: #e0e0e0 !important;
        border: 1px solid #555 !important;
    }
    
    .scale-reset:hover {
        background: #3a3a3a !important;
    }
    
    .scale-submit {
        background: #4CAF50 !important;
        color: white !important;
    }
    
    .scale-history-load {
        background: #1e90ff !important;
        color: white !important;
    }
    
    .scale-error {
        background: #2a1a1a !important;
        border-left: 4px solid #f44336 !important;
        color: #e0e0e0 !important;
    }
    
    /* MBTI 夜间模式 */
    .mbti-type-header {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    
    .mbti-type-header h2,
    .mbti-type-header .type-name {
        color: #f0f0f0 !important;
    }
    
    .mbti-type-header .type-code {
        color: #ffd700 !important;
    }
    
    .mbti-type-description {
        background: #1a1a1a !important;
    }
    
    .mbti-type-description p {
        color: #e0e0e0 !important;
    }
    
    .mbti-dimension {
        background: #1a1a1a !important;
    }
    
    .mbti-dimension h4 {
        color: #f0f0f0 !important;
    }
    
    .dimension-bar {
        background: #2a2a2a !important;
    }
    
    .dimension-pole.left {
        color: #66BB6A !important;
    }
    
    .dimension-pole.right {
        color: #42A5F5 !important;
    }
    
    .dimension-description {
        color: #b0b0b0 !important;
    }
}

/* 针对WebKit浏览器的夜间模式 */
@supports (-webkit-touch-callout: none) {
    @media (prefers-color-scheme: dark) {
        .scale-container {
            background: #000 !important;
        }
        
        .scale-container * {
            color: #e0e0e0 !important;
        }
        
        .scale-question {
            background: #1a1a1a !important;
            border: 1px solid #333 !important;
        }
        
        .scale-option {
            background: #2a2a2a !important;
            color: #e0e0e0 !important;
            border: 1px solid #444 !important;
        }
        
        .scale-title {
            color: #f0f0f0 !important;
        }
        
        .scale-description {
            color: #d0d0d0 !important;
        }
        
        .scale-question-text {
            color: #e0e0e0 !important;
        }
        
        /* MBTI WebKit夜间模式 */
        .mbti-type-header {
            background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        }
        
        .mbti-type-header h2,
        .mbti-type-header .type-name {
            color: #f0f0f0 !important;
        }
        
        .mbti-type-header .type-code {
            color: #ffd700 !important;
        }
        
        .mbti-type-description {
            background: #1a1a1a !important;
        }
        
        .mbti-type-description p {
            color: #e0e0e0 !important;
        }
        
        .mbti-dimension {
            background: #1a1a1a !important;
        }
        
        .mbti-dimension h4 {
            color: #f0f0f0 !important;
        }
        
        .dimension-bar {
            background: #2a2a2a !important;
        }
        
        .dimension-pole.left {
            color: #66BB6A !important;
        }
        
        .dimension-pole.right {
            color: #42A5F5 !important;
        }
        
        .dimension-description {
            color: #b0b0b0 !important;
        }
    }
}

/* DFTI 专用样式 */
.dfti-result {
    padding: 20px;
}

.dfti-persona {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.dfti-persona-name {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.dfti-persona-image {
    width: 100%;
    max-width: 300px;
    height: 300px;
    background: #e0e0e0;
    border-radius: 12px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    border: 2px dashed #ccc;
}

.dfti-persona-description {
    font-size: 18px;
    color: #555;
    margin-top: 20px;
    line-height: 1.8;
}

.dfti-radar-container {
    text-align: center;
    margin: 40px 0;
    padding: 30px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dfti-radar-container h3 {
    color: #333 !important;
    margin: 0 0 30px 0;
    font-size: 24px;
    font-weight: bold;
}

.dfti-radar-chart {
    max-width: 100%;
    height: auto;
}

.dfti-dimensions-analysis {
    margin-top: 40px;
}

.dfti-dimensions-analysis h3 {
    color: #333 !important;
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}

.dfti-dimension-analysis {
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.dfti-dimension-analysis h4 {
    color: #333 !important;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
}

.dfti-dimension-analysis .level {
    display: inline-block;
    padding: 4px 12px;
    background: #667eea;
    color: white !important;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
}

.dfti-dimension-analysis .level.H {
    background: #e74c3c;
}

.dfti-dimension-analysis .level.M {
    background: #f39c12;
}

.dfti-dimension-analysis .level.L {
    background: #3498db;
}

.dfti-dimension-analysis p {
    margin: 0;
    font-size: 16px;
    color: #555 !important;
    line-height: 1.6;
}

/* 继续按钮样式 */
.scale-continue {
    display: block;
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 20px;
}

.scale-continue:hover {
    background: #5a6fd6;
}

.scale-continue:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* DFTI 移动端适配 */
@media (max-width: 768px) {
    .dfti-persona {
        padding: 20px 15px;
    }
    
    .dfti-persona-name {
        font-size: 28px;
    }
    
    .dfti-persona-image {
        max-width: 250px;
        height: 250px;
    }
    
    .dfti-persona-description {
        font-size: 16px;
    }
    
    .dfti-radar-container {
        padding: 20px 15px;
    }
    
    .dfti-radar-container h3 {
        font-size: 20px;
    }
    
    .dfti-dimension-analysis {
        padding: 15px;
    }
    
    .dfti-dimension-analysis h4 {
        font-size: 16px;
    }
    
    .dfti-dimension-analysis p {
        font-size: 14px;
    }
}

/* DFTI 夜间模式 */
@media (prefers-color-scheme: dark) {
    .dfti-persona {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }
    
    .dfti-persona-name {
        color: #f0f0f0 !important;
    }
    
    .dfti-persona-image {
        background: #2a2a2a !important;
        border-color: #444 !important;
        color: #888 !important;
    }
    
    .dfti-persona-description {
        color: #d0d0d0 !important;
    }
    
    .dfti-radar-container {
        background: #1a1a1a !important;
    }
    
    .dfti-radar-container h3 {
        color: #f0f0f0 !important;
    }
    
    .dfti-dimension-analysis {
        background: #1a1a1a !important;
        border-left-color: #667eea !important;
    }
    
    .dfti-dimension-analysis h4 {
        color: #f0f0f0 !important;
    }
    
    .dfti-dimension-analysis p {
        color: #d0d0d0 !important;
    }
    
    .scale-continue {
        background: #667eea !important;
    }
    
    .scale-continue:hover {
        background: #5a6fd6 !important;
    }
    
    .scale-continue:disabled {
        background: #444 !important;
    }
}

/* DFTI WebKit 夜间模式 */
@supports (-webkit-touch-callout: none) {
    @media (prefers-color-scheme: dark) {
        .dfti-persona {
            background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        }
        
        .dfti-persona-name {
            color: #f0f0f0 !important;
        }
        
        .dfti-persona-image {
            background: #2a2a2a !important;
            border-color: #444 !important;
            color: #888 !important;
        }
        
        .dfti-persona-description {
            color: #d0d0d0 !important;
        }
        
        .dfti-radar-container {
            background: #1a1a1a !important;
        }
        
        .dfti-radar-container h3 {
            color: #f0f0f0 !important;
        }
        
        .dfti-dimension-analysis {
            background: #1a1a1a !important;
            border-left-color: #667eea !important;
        }
        
        .dfti-dimension-analysis h4 {
            color: #f0f0f0 !important;
        }
        
        .dfti-dimension-analysis p {
            color: #d0d0d0 !important;
        }
    }
}
