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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.screen {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    flex: 1;
}

.screen.active {
    display: block;
}

/* 欢迎页面样式 */
.welcome-content {
    text-align: center;
}

.welcome-content h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2rem;
}

.welcome-content p {
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.color-intro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    transition: transform 0.2s;
}

.color-item:hover {
    transform: translateY(-2px);
}

.color-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-circle.red { background: #e53e3e; }
.color-circle.yellow { background: #d69e2e; }
.color-circle.blue { background: #3182ce; }
.color-circle.green { background: #38a169; }

.instructions {
    text-align: left;
    background: #f7fafc;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
}

.instructions h3 {
    color: #2d3748;
    margin-bottom: 15px;
}

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

.instructions li {
    padding: 8px 0;
    color: #4a5568;
    position: relative;
    padding-left: 25px;
}

.instructions li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

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

/* 测试页面样式 */
.progress-bar {
    background: #e2e8f0;
    border-radius: 25px;
    height: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 25px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    color: #4a5568;
    font-weight: 600;
}

.question-container {
    margin-bottom: 40px;
}

#question-text {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 30px;
    line-height: 1.6;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.option:hover {
    border-color: #667eea;
    background: #f7fafc;
    transform: translateX(5px);
}

.option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 结果页面样式 */
.result-content {
    text-align: center;
}

.result-content h2 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 2rem;
}

.result-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.primary-color, .color-chart {
    background: #f7fafc;
    padding: 25px;
    border-radius: 15px;
}

.primary-color h3, .color-chart h3 {
    color: #2d3748;
    margin-bottom: 20px;
}

#primary-color-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.chart-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-description {
    background: #f7fafc;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: left;
}

.color-description h3 {
    color: #2d3748;
    margin-bottom: 15px;
}

.color-description p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* 历史页面样式 */
.history-content {
    text-align: center;
}

.history-content h2 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 2rem;
}

.history-item {
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    text-align: left;
    border-left: 4px solid #667eea;
}

.history-item h3 {
    color: #2d3748;
    margin-bottom: 10px;
}

.history-item p {
    color: #718096;
    margin-bottom: 5px;
}

.history-item .color-scores {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.color-score {
    display: flex;
    align-items: center;
    gap: 5px;
}

.color-score .color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.color-score .color-dot.red { background: #e53e3e; }
.color-score .color-dot.yellow { background: #d69e2e; }
.color-score .color-dot.blue { background: #3182ce; }
.color-score .color-dot.green { background: #38a169; }

/* 隐私提示 */
.privacy-tip {
    margin-top: 10px;
    color: #fefcbf;
    font-size: 0.9rem;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 20px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin-bottom: 10px;
    color: #2d3748;
    font-size: 1.4rem;
}

.modal-desc {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 14px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #4a5568;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.3);
}

.form-error {
    min-height: 18px;
    font-size: 0.85rem;
    color: #e53e3e;
    margin: 2px 0 8px;
    text-align: left;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .screen {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .color-intro {
        grid-template-columns: 1fr;
    }
    
    .result-summary {
        grid-template-columns: 1fr;
    }
    
    .navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

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

.screen.active {
    animation: fadeIn 0.5s ease;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
