* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}
body {
    background-color: #f9f5f0;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* 头部导航栏样式 */
.main-header {
    background: linear-gradient(135deg, #8b5a2b 0%, #a67c52 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    color: white;
}
.logo-subtitle {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}
.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}
.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}
.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* 页面头部样式 */
.page-header {
    text-align: center;
}
.page-header h1 {
    color: #8b5a2b;
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.page-header .subtitle {
    color: #666;
    font-size: 1.1rem;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
header {
    text-align: center;
    padding: 30px 0;
}
h1 {
    color: #8b5a2b;
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.subtitle {
    color: #666;
    font-size: 1.2rem;
}
.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}
input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}
.datetime-input {
    cursor: pointer;
}
.datetime-input:hover {
    border-color: #8b5a2b;
}
.datetime-input:focus {
    border-color: #8b5a2b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.2);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .datetime-input {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 15px;
        min-height: 50px; /* 增加触摸区域 */
    }
    
    /* 确保移动端日期时间输入框正常工作 */
    input[type="datetime-local"] {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* iOS Safari 特殊处理 */
    input[type="datetime-local"]::-webkit-datetime-edit {
        padding: 0;
    }
    
    input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
        padding: 0;
    }
}
button {
    background-color: #8b5a2b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}
button:hover {
    background-color: #6d4421;
}
.results {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
}
.results h2 {
    color: #8b5a2b;
    margin-bottom: 20px;
    text-align: center;
}
.name-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}
.name-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    transition: transform 0.2s;
    font-size: 1.1rem;
    text-align: center;
}
.name-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.name-text {
    cursor: pointer;
    transition: color 0.3s;
}
.name-text:hover {
    color: #8b5a2b;
}
.usage-tip {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.tip-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.tip-content {
    flex: 1;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.4;
}
.tip-content strong {
    color: #8b5a2b;
}

/* 打分功能样式 */
.scoring-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid #dee2e6;
}
.scoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.scoring-header h4 {
    margin: 0;
    color: #8b5a2b;
    font-size: 1.1rem;
}
.scoring-btn {
    background: linear-gradient(135deg, #8b5a2b 0%, #a67c52 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(139, 90, 43, 0.3);
}
.scoring-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 90, 43, 0.4);
}
.scoring-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.btn-icon {
    font-size: 1rem;
}
.btn-text {
    font-weight: 500;
}

/* 打分结果样式 */
.scoring-content {
    animation: fadeInUp 0.5s ease-out;
}
.score-total {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.score-number {
    font-size: 3rem;
    font-weight: bold;
    color: #8b5a2b;
    margin-bottom: 5px;
}
.score-label {
    color: #666;
    font-size: 1rem;
}
.score-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.score-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.score-name {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}
.score-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #8b5a2b;
}
.score-explanation, .score-notice {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.score-explanation h5 {
    margin: 0 0 10px 0;
    color: #8b5a2b;
    font-size: 1rem;
}
.score-explanation p, .score-notice p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}
.scoring-loading {
    text-align: center;
    padding: 20px;
}
.scoring-loading .loading-spinner {
    width: 30px;
    height: 30px;
    margin: 0 auto 10px;
}
.scoring-error {
    background: #fff5f5;
    color: #e53e3e;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #fed7d7;
}

/* 五格评分样式 */
.score-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}
.score-item.score-good {
    border-left: 4px solid #28a745;
}
.score-item.score-bad {
    border-left: 4px solid #dc3545;
}
.score-item.score-normal {
    border-left: 4px solid #ffc107;
}
.score-desc {
    font-size: 0.85rem;
    color: #666;
    margin: 8px 0;
    line-height: 1.4;
}
.score-xiongji {
    font-size: 0.8rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}
.score-item.score-good .score-xiongji {
    background: #d4edda;
    color: #155724;
}
.score-item.score-bad .score-xiongji {
    background: #f8d7da;
    color: #721c24;
}
.score-item.score-normal .score-xiongji {
    background: #fff3cd;
    color: #856404;
}

/* 三才、五行、笔画样式 */
.score-sancai, .score-wuxing, .score-bihua {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.score-sancai h5, .score-wuxing h5, .score-bihua h5 {
    margin: 0 0 10px 0;
    color: #8b5a2b;
    font-size: 1rem;
}
.sancai-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #8b5a2b;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}
.wuxing-values, .bihua-values {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.wuxing-item, .bihua-item {
    background: #8b5a2b;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* 底部版权样式 */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px 0;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-brand h3 {
    color: #8b5a2b;
    font-size: 1.3rem;
    margin-bottom: 8px;
}
.footer-brand p {
    color: #bdc3c7;
    font-size: 0.9rem;
    margin: 0;
}
.footer-links {
    display: flex;
    gap: 25px;
}
.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: #8b5a2b;
}
.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 15px;
    text-align: center;
}
.footer-bottom p {
    margin: 0;
    color: #95a5a6;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* 功能介绍样式 */
.features-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}
.features-header {
    text-align: center;
    margin-bottom: 40px;
}
.features-header h2 {
    color: #8b5a2b;
    font-size: 2.2rem;
    margin-bottom: 15px;
}
.features-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.feature-card {
    background: white;
    padding: 30px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
}
.feature-card h3 {
    color: #8b5a2b;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}
.feature-card p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* 按钮状态样式 */
.btn-loading {
    background: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    transform: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}
.btn-loading:hover {
    transform: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}
.btn-success {
    background: #28a745 !important;
    cursor: not-allowed !important;
}
.btn-success:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3) !important;
}
.btn-error {
    background: #dc3545 !important;
    cursor: not-allowed !important;
}
.btn-error:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3) !important;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.name-number {
    font-weight: bold;
    color: #8b5a2b;
    margin-right: 10px;
}
.loading {
    text-align: center;
    padding: 40px;
    display: none;
}
#analysis-loading {
    display: block !important;
}
.loading-content {
    max-width: 400px;
    margin: 0 auto;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #8b5a2b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-steps {
    margin-top: 20px;
}
.step {
    padding: 8px 0;
    color: #999;
    font-size: 0.9rem;
    transition: color 0.3s;
}
.step.active {
    color: #8b5a2b;
    font-weight: bold;
}
.step.completed {
    color: #28a745;
}
.error {
    color: #dc3545;
    padding: 15px;
    background-color: #f8d7da;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}
.error-details {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff5f5;
    border-radius: 4px;
    font-size: 0.9rem;
    display: none;
}
@media (max-width: 1024px) and (min-width: 769px) {
    .name-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .name-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .name-item {
        padding: 12px 8px;
        font-size: 1rem;
    }
    .name-number {
        font-size: 0.9rem;
        margin-right: 6px;
    }
    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .name-list {
        gap: 8px;
    }
    .name-item {
        padding: 10px 6px;
        font-size: 0.95rem;
    }
    .name-number {
        font-size: 0.85rem;
        margin-right: 4px;
    }
    .usage-tip {
        padding: 12px 15px;
        margin: 15px 0;
    }
    .tip-content {
        font-size: 0.9rem;
    }
    
    /* 移动端头部导航 */
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .nav-list {
        gap: 15px;
    }
    .nav-link {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    /* 移动端底部 */
    .footer-main {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .footer-links {
        justify-content: center;
        gap: 20px;
    }
    
    /* 移动端功能介绍 */
    .features-section {
        margin: 40px 0;
        padding: 30px 0;
    }
    .features-header h2 {
        font-size: 1.8rem;
    }
    .features-header p {
        font-size: 1rem;
        padding: 0 20px;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    .feature-card {
        padding: 25px 20px;
    }
    .feature-icon {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    .feature-card h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    .feature-card p {
        font-size: 0.9rem;
    }
}

/* 姓名点击样式 */
.name-text {
    cursor: pointer;
    transition: color 0.2s;
}
.name-text:hover {
    color: #8b5a2b;
    text-decoration: underline;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    margin: 0;
    color: #8b5a2b;
}
.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover {
    color: #000;
}
.modal-body {
    padding: 20px;
}
.analysis-content {
    line-height: 1.8;
}
.analysis-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #8b5a2b;
}
.analysis-section-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #8b5a2b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}
.analysis-text {
    color: #333;
    line-height: 1.8;
    font-size: 1rem;
}
.highlight-word {
    color: #8b5a2b;
    font-weight: bold;
    background: #f0f8ff;
    padding: 2px 4px;
    border-radius: 3px;
}
.analysis-highlight {
    background: #fff3cd;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border-left: 3px solid #ffc107;
}
.analysis-section .analysis-text ul {
    margin: 10px 0;
    padding-left: 20px;
}
.analysis-section .analysis-text li {
    margin: 5px 0;
    line-height: 1.6;
}
.notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* 广告位样式 */
.ad-container {
    background: white;
    margin: 20px auto;
    max-width: 1200px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid #e9ecef;
}

/* 移动端广告位优化 */
@media (max-width: 768px) {
    .ad-container {
        margin: 15px 10px;
        padding: 10px 15px;
        border-radius: 6px;
    }
}

