/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Ma Shan Zheng', cursive, 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #f0f0f0;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(45deg, #2c1810, #8b4513, #2c1810);
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffd700;
}

.title {
    font-size: 3.5em;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
    font-weight: bold;
}

.subtitle {
    font-size: 1.2em;
    color: #e6c567;
    font-style: italic;
}

/* 导航样式 */
.navigation {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(139, 69, 19, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.nav-btn {
    padding: 12px 20px;
    background: linear-gradient(45deg, #8b4513, #a0522d);
    color: #ffd700;
    border: 2px solid #ffd700;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    font-weight: bold;
}

.nav-btn:hover {
    background: linear-gradient(45deg, #a0522d, #cd853f);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.nav-btn.active {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #8b4513;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.6);
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* 页面样式 */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 首页样式 */
.home-section h2 {
    color: #ffd700;
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.time-display {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.4), rgba(160, 82, 45, 0.4));
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.current-time {
    font-size: 2.5em;
    color: #ffd700;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.calendar-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    font-size: 1.3em;
}

.solar-date, .lunar-date {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.daily-fortune {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.fortune-section {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.3), rgba(160, 82, 45, 0.3));
    padding: 25px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.fortune-section h3 {
    color: #ffd700;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.daily-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.suitable, .avoid {
    padding: 15px;
    border-radius: 10px;
}

.suitable {
    background: rgba(0, 128, 0, 0.2);
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.avoid {
    background: rgba(128, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.suitable h4 {
    color: #90ee90;
    margin-bottom: 10px;
}

.avoid h4 {
    color: #ff6b6b;
    margin-bottom: 10px;
}

.wuxing-info, .pengzu-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.wuxing-info div {
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* 表单样式 */
.input-section {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.3), rgba(160, 82, 45, 0.3));
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #ffd700;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 1.1em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ffd700;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #f0f0f0;
    font-size: 16px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ffed4e;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.date-input {
    margin-bottom: 20px;
    text-align: center;
}

.date-input label {
    color: #ffd700;
    font-size: 1.1em;
}

.date-input input[type="radio"] {
    width: auto;
    margin: 0 10px;
}

.birth-date {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.birth-date select {
    flex: 1;
    min-width: 80px;
}

.calc-btn {
    display: block;
    width: 200px;
    margin: 30px auto 0;
    padding: 15px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #8b4513;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

.reset-btn {
    display: inline-block;
    margin-left: 20px;
    padding: 10px 20px;
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.5);
}

/* 结果区域样式 */
.result-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(139, 69, 19, 0.2));
    padding: 30px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    margin-top: 30px;
    min-height: 200px;
}

.result-section h3 {
    color: #ffd700;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.result-table th,
.result-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.result-table th {
    background: linear-gradient(45deg, #8b4513, #a0522d);
    color: #ffd700;
    font-weight: bold;
}

.result-table td {
    background: rgba(0, 0, 0, 0.2);
}

.analysis-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.analysis-section h4 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* 婚姻页面样式 */
.marriage-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.person-section {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.3), rgba(160, 82, 45, 0.3));
    padding: 25px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.person-section h3 {
    color: #ffd700;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

/* 诸葛神算样式 */
.zhuge-intro,
.coin-intro,
.yarrow-intro,
.plum-intro,
.random-intro {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    line-height: 1.8;
}

.three-chars {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.three-chars label {
    color: #ffd700;
    font-weight: bold;
}

.three-chars input {
    width: 60px !important;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

/* 掷钱占卜样式 */
.throw-area {
    text-align: center;
}

.coin-result {
    margin-bottom: 30px;
}

.throw-round {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-display {
    font-weight: bold;
    color: #ffd700;
    min-width: 120px;
    text-align: right;
}

/* 梅花易数样式 */
.number-input {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.number-input label {
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 0;
}

.number-input input {
    width: 150px !important;
    text-align: center;
}

/* 随机数样式 */
.random-number {
    text-align: center;
    margin: 30px 0;
}

.current-number {
    font-size: 2.5em;
    color: #ffd700;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.4), rgba(160, 82, 45, 0.4));
    padding: 30px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.current-number span {
    font-family: 'Courier New', monospace;
    letter-spacing: 5px;
}

.history-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-top: 30px;
}

.history-section h3 {
    color: #ffd700;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

#history-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

#history-list li {
    background: rgba(139, 69, 19, 0.2);
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-number {
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    color: #ffd700;
    font-weight: bold;
    letter-spacing: 2px;
}

.history-time {
    color: #ccc;
    font-size: 0.9em;
}

/* 过程显示样式 */
.process-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 30px;
    min-height: 200px;
}

.process-step {
    background: rgba(139, 69, 19, 0.2);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.process-step h4 {
    color: #ffd700;
    margin-bottom: 10px;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 30px;
    margin-top: 40px;
    background: linear-gradient(45deg, #2c1810, #8b4513, #2c1810);
    border-radius: 15px;
    border: 2px solid #ffd700;
    color: #e6c567;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 2.5em;
    }
    
    .navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .marriage-form {
        grid-template-columns: 1fr;
    }
    
    .calendar-info {
        grid-template-columns: 1fr;
    }
    
    .daily-info {
        grid-template-columns: 1fr;
    }
    
    .birth-date {
        flex-direction: column;
    }
    
    .birth-date select {
        width: 100%;
    }
    
    .three-chars {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .three-chars input {
        width: 100% !important;
    }
    
    .number-input {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .number-input input {
        width: 100% !important;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #8b4513, #ffd700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
}