/* 以下为原index.php中121-585行的主样式 */
:root {
    --primary-color: #c7254e;
    --secondary-color: #8e354a;
    --light-bg: #f8f8f8;
    --border-color: #eee;
    --text-color: #333;
    --light-text: #777;
}

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

body {
    font-family: "Microsoft YaHei", SimSun, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: #fefefe;
    padding: 0;
    margin: 0;
}

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

header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1,
h2,
h3,
h4 {
    color: var(--primary-color);
    margin: 12px 0;
}

.main-title {
    color: white;
    font-size: 2.2rem;
    margin: 8px 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-weight: normal;
    font-size: 0.95rem;
}

.main-content {
    display: flex;
    flex-direction: column;
    /* 强制上下排列 */
    gap: 15px;
    margin-bottom: 20px;
}

.today-info.section,
.calendar-section.section,
.forecast-section.section {
    width: 100%;
    min-width: unset;
    flex: unset;
}

.calendar-section {
    display: flex;
    flex-direction: column;
}

.section {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

.section-title {
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.today-info {
    flex: 1;
    min-width: 280px;
}

.calendar-section {
    flex: 1.2;
    min-width: 350px;
    display: flex;
    flex-direction: column;
}

.forecast-section {
    flex: 1;
    min-width: 280px;
}

.date-info {
    background-color: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.date-info p {
    margin: 6px 0;
}

.yi-ji {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.yi,
.ji {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    border-radius: 8px;
}

.yi {
    background-color: #f1f8e9;
    border-left: 4px solid #7cb342;
}

.ji {
    background-color: #fbe9e7;
    border-left: 4px solid #e64a19;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag {
    background-color: var(--light-bg);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
}

.yi .tag {
    background-color: #dcedc8;
    color: #33691e;
}

.ji .tag {
    background-color: #ffccbc;
    color: #bf360c;
}

.direction-info {
    margin: 15px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 3px;
}

.weekday {
    text-align: center;
    font-weight: bold;
    padding: 5px 0;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.calendar-day {
    min-height: 60px;
    max-height: 70px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 3px;
    text-align: center;
    position: relative;
    background-color: white;
    overflow: hidden;
    transition: all 0.2s;
}

.calendar-day:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.solar-day {
    font-size: 15px;
    font-weight: bold;
}

.lunar-day {
    font-size: 11px;
    color: var(--light-text);
    margin-top: 2px;
}

.today {
    background-color: #ffebee;
    border: 1px solid var(--primary-color);
}

.festival {
    font-size: 10px;
    color: var(--primary-color);
    margin-top: 2px;
    line-height: 1.2;
}

.jieqi {
    font-size: 10px;
    color: #0277bd;
    font-weight: bold;
    margin-top: 2px;
    line-height: 1.2;
}

.empty-day {
    background-color: #f9f9f9;
    border: 1px dashed #ddd;
}

.future-days {
    margin-top: 15px;
}

.future-day {
    background-color: var(--light-bg);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--secondary-color);
}

.future-date {
    font-weight: bold;
    color: var(--primary-color);
}

.weekday-name {
    color: var(--light-text);
    font-size: 12px;
}

.luck-analysis {
    padding: 12px;
    background-color: #e8f5e9;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #4caf50;
}

.date-selector {
    margin-bottom: 15px;
    padding: 12px;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.date-inputs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.date-inputs select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
}

.view-btn,
.today-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.today-btn {
    background-color: #e0e0e0;
    color: #333;
    margin-left: 5px;
}

.day-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
    position: relative;
}

.footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 15px 0;
    margin-top: 15px;
    font-size: 0.9rem;
}

.footer a {
    color: white;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.auto-update-info {
    text-align: center;
    padding: 8px;
    background-color: #e8f5e9;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 13px;
    color: #388e3c;
}

.info-panel {
    margin: 0 0 15px 0;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .calendar-day {
        min-height: 55px;
    }
}

.bazi-analysis {
    padding: 12px;
    background-color: #f8eafa;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #9c27b0;
}

.bazi-grid {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    text-align: center;
}

.bazi-item {
    border: 1px solid #e1bee7;
    border-radius: 4px;
    padding: 8px;
    background-color: white;
    min-width: 20%;
}

.bazi-label {
    font-size: 12px;
    color: #7b1fa2;
    margin-bottom: 4px;
}

.bazi-value {
    font-size: 16px;
    font-weight: bold;
    color: #4a148c;
}

.bazi-wuxing {
    font-size: 12px;
    margin-top: 4px;
    color: #6a1b9a;
}

.nayin-info {
    margin-top: 8px;
    font-size: 13px;
}

.shichen-section {
    padding: 12px;
    background-color: #e3f2fd;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #1976d2;
}

.time-selector {
    margin: 10px 0;
}

.time-selector select {
    padding: 6px 10px;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    background-color: white;
    width: 100%;
}

.current-time-info {
    margin-top: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #bbdefb;
}

.time-yi-ji {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.time-yi,
.time-ji {
    flex: 1;
    min-width: 120px;
}

.time-yi h4,
.time-ji h4 {
    margin: 0 0 5px 0;
    font-size: 13px;
}

.lucky-days-section {
    margin-top: 15px;
}

.lucky-days-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lucky-day-item {
    background-color: var(--light-bg);
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lucky-day-date {
    font-weight: bold;
    margin-bottom: 5px;
}

.lucky-day-lunar {
    font-size: 12px;
    color: var(--light-text);
}

.lucky-day-yi {
    margin-top: 5px;
}

.lucky-tag {
    background-color: #dcedc8;
    padding: 2px 4px;
    border-radius: 4px;
    margin-left: 2px;
}

.no-lucky-days {
    color: var(--light-text);
    text-align: center;
}

.jieqi-wuhou {
    padding: 12px;
    background-color: #fff8e1;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #ffa000;
}

.jieqi-info {
    margin-top: 8px;
}

.jieqi-item {
    margin-bottom: 5px;
    display: flex;
    flex-wrap: wrap;
}

.jieqi-label {
    color: #bf8040;
    font-weight: bold;
    margin-right: 8px;
    min-width: 80px;
}

.jieqi-value {
    color: #795548;
}