/* ========== 基础样式 ========== */
:root {
    --primary-color: #e74c3c;
    --secondary-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* ========== 头部样式 ========== */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), #c0392b);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.main-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========== 导航栏 ========== */
.main-nav {
    background-color: var(--dark-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.main-nav li {
    margin: 0 1rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

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

.main-nav a.active {
    background-color: var(--primary-color);
    font-weight: bold;
}

/* ========== 主要内容 ========== */
.main-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    margin: 2rem 0;
}

/* ========== 工具网格 ========== */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.tool-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tool-item a {
    display: block;
    text-decoration: none;
    color: var(--dark-color);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* ========== 球样式 ========== */
.ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.blue-ball {
    background-color: var(--secondary-color);
}

.ball-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1rem 0;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* ========== 小六壬样式 ========== */
.liuren-result {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.time-item {
    padding: 1rem;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.time-item.current-time {
    border: 2px solid var(--primary-color);
    background-color: rgba(231, 76, 60, 0.1);
}

.time-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.time-god {
    color: var(--dark-color);
    margin: 0.5rem 0;
}

.time-luck {
    font-weight: bold;
}

.time-luck.good {
    color: var(--success-color);
}

.time-luck.bad {
    color: var(--danger-color);
}

/* ========== 万年历样式 ========== */
.calendar-info {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.good-things, .bad-things {
    flex: 1;
    padding: 1.5rem;
    border-radius: 8px;
}

.good-things {
    background-color: #e8f8f0;
    border: 1px solid var(--success-color);
}

.bad-things {
    background-color: #fce8e8;
    border: 1px solid var(--danger-color);
}

.time-luck-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.time-luck-item {
    padding: 1rem;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.time-luck-item.current {
    border: 2px solid var(--primary-color);
}

/* ========== 页脚 ========== */
.main-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 2rem;
}

.main-footer p {
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .main-nav ul {
        padding: 0.5rem 0;
    }

    .main-nav li {
        margin: 0.5rem;
    }

    .calendar-info {
        flex-direction: column;
    }

    .time-luck-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ball {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .time-luck-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-header h1 {
        font-size: 2rem;
    }
}


/* 万年历特定样式 */
.date-info {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--dark-color);
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.calendar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.good-things, .bad-things {
    padding: 1.5rem;
    border-radius: 8px;
}

.good-things {
    background-color: #e8f8f0;
    border: 1px solid var(--success-color);
}

.bad-things {
    background-color: #fce8e8;
    border: 1px solid var(--primary-color);
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.time-item {
    padding: 1rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    text-align: center;
    transition: all 0.3s ease;
}

.time-item.current-time {
    border: 2px solid var(--primary-color);
    background-color: rgba(231, 76, 60, 0.1);
}

.time-name {
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.time-element {
    color: var(--secondary-color);
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.time-luck-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-top: 0.5rem;
}

.time-luck-indicator.good {
    background-color: var(--success-color);
    color: white;
}

.time-luck-indicator.bad {
    background-color: var(--primary-color);
    color: white;
}

.recommend-balls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

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

    .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .time-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* 首页彩票类型显示补充样式 */
/* ========== 彩票类型专业样式 ========== */
.lottery-types-section {
    margin: 3rem 0;
}

.section-title {
    text-align: center;
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #e74c3c, #3498db);
    margin: 0.5rem auto 0;
}

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.lottery-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
    text-align: center;
}

.lottery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.lottery-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f7fa, #e4e7eb);
}

.lottery-card h4 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.lottery-balls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.lottery-balls .ball {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.lottery-desc {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* 不同类型特色样式 */
.lottery-card.ssq {
    border-top-color: #e74c3c;
}
.lottery-card.ssq .ball.red {
    background-color: #e74c3c;
    color: white;
}
.lottery-card.ssq .ball.blue {
    background-color: #3498db;
    color: white;
}

.lottery-card.fc3d {
    border-top-color: #f39c12;
}
.lottery-card.fc3d .ball {
    background-color: #f39c12;
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .lottery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .lottery-grid {
        grid-template-columns: 1fr;
    }
}



/* 万年历选号专用样式 */
.calendar-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.date-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    color: #555;
    flex-wrap: wrap;
}

.current-time-info {
    font-weight: bold;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

.luck-indicator {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

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

.luck-indicator.bad {
    background-color: #e74c3c;
    color: white;
}

.algorithm-intro {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
    border-left: 4px solid #3498db;
}

.algorithm-intro h3 {
    margin-top: 0;
    color: #2c3e50;
}

.algorithm-intro ul {
    padding-left: 1.5rem;
}

.lottery-recommendations {
    margin: 3rem 0;
}

.lottery-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.lottery-card.ssq {
    border-left: 4px solid #e74c3c;
}

.lottery-card.fc3d {
    border-left: 4px solid #f39c12;
}

.lottery-card.kl8 {
    border-left: 4px solid #2ecc71;
}

.lottery-card.qlc {
    border-left: 4px solid #9b59b6;
}

.lottery-card.dlt {
    border-left: 4px solid #e67e22;
}

.lottery-card.pl3 {
    border-left: 4px solid #3498db;
}

.lottery-card.pl5 {
    border-left: 4px solid #1abc9c;
}

.lottery-card.qxc {
    border-left: 4px solid #f1c40f;
}

.lottery-header {
    margin-bottom: 1.5rem;
}

.lottery-header h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.algorithm-desc {
    background-color: #ecf0f1;
    padding: 0.8rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #2c3e50;
    white-space: pre-line;
}

.ball-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin: 1rem 0;
}

.ball {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background-color: #e74c3c;
    color: white;
}

.red-ball {
    background-color: #e74c3c;
}

.blue-ball {
    background-color: #3498db;
}

.time-luck-section {
    margin: 3rem 0;
}

/*.time-grid {*/
/*    display: grid;*/
/*    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));*/
/*    gap: 1rem;*/
/*    margin-top: 1.5rem;*/
/*}*/

/*.time-item {*/
/*    padding: 1rem;*/
/*    border-radius: 8px;*/
/*    background-color: #f8f9fa;*/
/*    text-align: center;*/
/*}*/

.current-time {
    border: 2px solid #f39c12;
    background-color: rgba(243, 156, 18, 0.1);
}

.time-name {
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.time-element {
    color: #7f8c8d;
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.time-luck {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.time-luck.good {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.time-luck.bad {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

.disclaimer {
    text-align: center;
    color: #95a5a6;
    font-size: 0.9rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .date-info {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ball {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .time-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lottery-header h3 {
        font-size: 1.1rem;
    }

    .algorithm-desc {
        font-size: 0.8rem;
    }
}