/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e74c3c;
    --secondary-color: #f39c12;
    --accent-color: #d35400;
    --text-color: #333;
    --light-text: #777;
    --border-color: #ddd;
    --light-bg: #f9f9f9;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --gradient-bg: linear-gradient(135deg, #e74c3c 0%, #d35400 100%);
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-color);
    background-color: #f5f5f5;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.site-header {
    text-align: center;
    padding: 30px 0;
    background: var(--gradient-bg);
    color: white;
    border-radius: 0 0 15px 15px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

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

/* 主内容区域样式 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 卡片通用样式 */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

/* 手机号码测试区域 */
.fortune-card {
    text-align: center;
    padding: 30px 20px;
}

.fortune-card h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.input-area {
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

input[type="tel"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 30px 0 0 30px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s;
}

input[type="tel"]:focus {
    border-color: var(--primary-color);
}

button[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    padding: 0 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background: var(--accent-color);
}

/* 结果容器 */
.result-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    transition: all 0.5s ease;
    opacity: 1;
}

.hidden {
    display: none;
    opacity: 0;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.phone-display {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.fortune-score {
    background: var(--gradient-bg);
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.result-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    background: var(--light-bg);
    padding: 12px;
    border-radius: 8px;
}

.detail-item h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.detail-item p {
    font-size: 0.95rem;
}

.fortune-analysis {
    margin-top: 20px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* 信息区域样式 */
.info-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.today-calendar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calendar-item {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
}

.lunar-date {
    color: var(--primary-color);
}

.calendar-detail p {
    margin-bottom: 8px;
}

.good {
    color: #27ae60;
}

.bad {
    color: #c0392b;
}

.knowledge-content p {
    margin-bottom: 10px;
    text-align: justify;
}

/* 页脚样式 */
.site-footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
    color: var(--light-text);
    font-size: 0.9rem;
}

.update-time {
    margin-top: 5px;
    font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .result-details {
        grid-template-columns: 1fr;
    }

    .form-group {
        flex-direction: column;
    }

    input[type="tel"] {
        border-radius: 30px;
        margin-bottom: 10px;
    }

    button[type="submit"] {
        border-radius: 30px;
        padding: 12px;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 测算结果等级样式 */
.fortune-level {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 5px;
}

.level-excellent {
    background-color: #27ae60;
    color: white;
}

.level-good {
    background-color: #2ecc71;
    color: white;
}

.level-average {
    background-color: #f39c12;
    color: white;
}

.level-poor {
    background-color: #e74c3c;
    color: white;
}

.level-bad {
    background-color: #c0392b;
    color: white;
}

/* 数字五行属性样式 */
.wuxing-item {
    display: inline-block;
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    border-radius: 50%;
    margin: 0 2px;
    font-weight: bold;
}

.wuxing-jin {
    background-color: #f5f5f5;
    color: #797979;
    border: 1px solid #ccc;
}

.wuxing-mu {
    background-color: #d5f5e3;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.wuxing-shui {
    background-color: #d4e6f1;
    color: #2980b9;
    border: 1px solid #2980b9;
}

.wuxing-huo {
    background-color: #fadbd8;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.wuxing-tu {
    background-color: #fef5e7;
    color: #f39c12;
    border: 1px solid #f39c12;
}

/* 价格评估样式 */
.price-estimation {
    margin-top: 20px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.price-estimation h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.price-range {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.operator-badge {
    background-color: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.price-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e67e22;
}

.price-reasons-container {
    margin-top: 10px;
}

.price-reasons-container p {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

.price-reasons {
    list-style-type: none;
    padding-left: 0;
}

.price-reasons li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.price-reasons li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* 导航样式 */
.main-nav {
    margin-top: 15px;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 内容区块样式 */
.content-section {
    margin-top: 30px;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.section-content {
    line-height: 1.8;
}

.section-content h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin: 20px 0 10px;
}

.section-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.operator-list,
.contact-list {
    list-style-type: none;
    padding-left: 0;
    margin: 15px 0;
}

.operator-list li,
.contact-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.operator-list li:before,
.contact-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 关键词样式 */
.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.keyword {
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.keyword:hover {
    background-color: #f0f0f0;
}

/* 页脚样式增强 */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-nav {
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

.copyright {
    font-weight: bold;
    margin-bottom: 5px;
}

.disclaimer {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 10px;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
    }

    .main-nav li {
        margin: 5px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-content h3 {
        font-size: 1.2rem;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 备案信息样式 */
.beian {
    margin: 5px 0;
    font-size: 0.85rem;
}

.beian a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.beian a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 友情链接样式 */
.friend-links {
    width: 100%;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.friend-links-title {
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--light-text);
    margin-bottom: 10px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.friend-links-container a {
    color: #888;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s;
}

.friend-links-container a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 在移动端的友情链接调整 */
@media (max-width: 768px) {
    .friend-links-container {
        gap: 10px;
    }

    .friend-links-container a {
        font-size: 0.8rem;
        padding: 3px 5px;
    }
}

/* 号码归属地信息样式 */
.location-info {
    margin: 15px 0;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.location-info h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #3498db;
}

.location-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.location-item {
    display: flex;
    align-items: center;
}

.location-label {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-right: 5px;
}

.location-value {
    font-weight: bold;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .location-details {
        grid-template-columns: 1fr;
    }
}

/* 新增内容区域样式 */
.faq-section .faq-item {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.faq-section .faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.faq-section .faq-item p {
    line-height: 1.6;
    color: var(--text-color);
}

.features-section .feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-item p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.tips-section .section-content h3 {
    color: var(--primary-color);
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.tips-section .section-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.culture-section .section-content h3 {
    color: var(--primary-color);
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
}

.culture-section .section-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: justify;
}

.testimonials-section .testimonial-item {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary-color);
}

.testimonial-item p {
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-color);
}

.testimonial-author {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.news-section .news-item {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.news-item h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.news-item p {
    line-height: 1.6;
    color: var(--text-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .features-section .feature-grid {
        grid-template-columns: 1fr;
    }

    .faq-section .faq-item,
    .testimonials-section .testimonial-item,
    .news-section .news-item {
        margin-bottom: 15px;
        padding: 12px;
    }

    .tips-section .section-content h3,
    .culture-section .section-content h3 {
        font-size: 1rem;
    }
}