/* 老黄历样式 */

/* 全宽布局 */
.tool-main-fullwidth {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* 底部推荐工具 */
.recommended-tools-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

/* 日期选择区域 */
.date-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* 黄历结果区域 */
.almanac-header {
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.date-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.date-info p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.zodiac-info {
    display: flex;
    gap: 2rem;
}

.zodiac-item {
    text-align: center;
}

.zodiac-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.zodiac-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
}

/* 黄道吉日区域 */
.auspicious-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.auspicious-item {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: var(--transition);
}

.auspicious-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.auspicious-item.good {
    border-color: var(--success-color);
}

.auspicious-item.bad {
    border-color: var(--error-color);
}

.auspicious-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.auspicious-content h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.auspicious-content ul {
    list-style: none;
    padding: 0;
}

.auspicious-content li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.auspicious-content li:last-child {
    border-bottom: none;
}

/* 详细信息区域 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-item {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.detail-item:hover {
    box-shadow: var(--shadow-md);
}

.detail-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* 时辰吉凶区域 */
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.time-item {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.time-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.time-item.good {
    border-color: var(--success-color);
}

.time-item.bad {
    border-color: var(--error-color);
}

.time-item.neutral {
    border-color: var(--secondary-color);
}

.time-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.time-range {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.time-status {
    font-size: 0.85rem;
    font-weight: 500;
}

.time-item.good .time-status {
    color: var(--success-color);
}

.time-item.bad .time-status {
    color: var(--error-color);
}

.time-item.neutral .time-status {
    color: var(--secondary-color);
}

/* 冲煞信息区域 */
.conflict-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.conflict-item {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.conflict-item:hover {
    box-shadow: var(--shadow-md);
}

.conflict-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.conflict-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* 黄历区域通用样式 */
.almanac-section {
    margin-bottom: 2rem;
}

.almanac-section:last-child {
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .almanac-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .zodiac-info {
        gap: 1rem;
    }
    
    .auspicious-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .conflict-info {
        grid-template-columns: 1fr;
    }
    
    .date-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .time-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .almanac-header {
        padding: 1.5rem;
    }
    
    .date-info h2 {
        font-size: 1.5rem;
    }
}

/* 传统风格装饰 */
.almanac-header::before {
    content: "📅";
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.auspicious-item.good::before {
    content: "✨";
    position: absolute;
    top: -5px;
    right: 10px;
    font-size: 1.2rem;
    opacity: 0.7;
}

.auspicious-item.bad::before {
    content: "⚠️";
    position: absolute;
    top: -5px;
    right: 10px;
    font-size: 1.2rem;
    opacity: 0.7;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 传统色彩主题 */
:root {
    --traditional-red: #DC2626;
    --traditional-gold: #D97706;
    --traditional-green: #059669;
    --traditional-brown: #8B4513;
}

/* 特殊效果 */
.auspicious-item.good .auspicious-content h4 {
    color: var(--traditional-green);
}

.auspicious-item.bad .auspicious-content h4 {
    color: var(--traditional-red);
}

.time-item.good {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.time-item.bad {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.time-item.neutral {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

/* ========== 月历视图样式 ========== */

/* 月历导航栏 */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}

.calendar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.year-select,
.month-select {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.year-select:hover,
.month-select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.year-select option,
.month-select option {
    background: #8B4513;
    color: white;
}

.nav-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* 月历容器 */
.calendar-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* 星期标题 */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 1rem;
    padding: 1rem 0;
    border-bottom: 2px solid #e5e7eb;
}

.weekday {
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: #6b7280;
}

.weekday:first-child,
.weekday:last-child {
    color: #ef4444;
}

/* 日期网格 */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

/* 单个日期格子 */
.calendar-day {
    min-height: 120px;
    padding: 10px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.calendar-day:hover {
    border-color: #D2691E;
    box-shadow: 0 4px 12px rgba(210, 105, 30, 0.2);
    transform: translateY(-2px);
}

/* 选中状态 */
.calendar-day.selected {
    border-color: #8B4513;
    background: linear-gradient(135deg, #fff5e6 0%, #ffecd1 100%);
    box-shadow: 0 6px 16px rgba(139, 69, 19, 0.3);
}

/* 今日高亮 */
.calendar-day.today {
    border-color: #D2691E;
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    box-shadow: 0 4px 12px rgba(210, 105, 30, 0.25);
}

.calendar-day.today .date-number {
    background: linear-gradient(135deg, #D2691E, #8B4513);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 周末标识 */
.calendar-day.weekend .date-number {
    color: #ef4444;
}

/* 其他月份日期 */
.calendar-day.other-month {
    opacity: 0.4;
    background: #f9fafb;
}

.calendar-day.other-month:hover {
    opacity: 0.6;
}

/* 日期元素 */
.date-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.lunar-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.ganzhi {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-bottom: 6px;
}

/* 宜忌标签 */
.day-tags {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
}

.day-tags .tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-tags .tag.suitable {
    background: #dcfce7;
    color: #059669;
    border: 1px solid #86efac;
}

.day-tags .tag.unsuitable {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

/* 节日标记 */
.calendar-day .festival {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.65rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========== 详细信息区域 ========== */

.almanac-detail {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
}

.detail-title {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

.detail-title span {
    display: block;
}

.detail-title span:first-child {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.detail-title span:last-child {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 三栏布局 */
.three-column-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.detail-card:hover {
    border-color: #D2691E;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.suitable-card {
    border-color: #86efac;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.unsuitable-card {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-list li {
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #D2691E;
    transition: all 0.2s ease;
}

.detail-list li:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(4px);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-tags .tag {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #6b7280;
    transition: all 0.2s ease;
}

.detail-tags .tag:hover {
    background: white;
    border-color: #D2691E;
    color: #8B4513;
}

/* 主信息卡片 */
.main-info-card {
    background: linear-gradient(135deg, #fff5e6, #ffecd1);
    border-color: #D2691E;
}

.main-date {
    text-align: center;
    padding: 1rem;
    margin-bottom: 1rem;
}

.gregorian-date {
    font-size: 1.6rem;
    font-weight: 700;
    color: #8B4513;
    margin-bottom: 0.5rem;
}

.main-date .weekday {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 0.3rem;
}

.main-date .constellation {
    font-size: 0.9rem;
    color: #9ca3af;
}

.lunar-info {
    text-align: center;
    padding-top: 1rem;
    border-top: 2px solid rgba(139, 69, 19, 0.2);
}

.lunar-date {
    font-size: 1.1rem;
    color: #8B4513;
    margin-bottom: 0.75rem;
}

.ganzhi-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.ganzhi-info span {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #8B4513;
    font-weight: 600;
}

/* ========== 时辰表格 ========== */

.time-table-section {
    margin-top: 2rem;
}

.time-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.time-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 1200px;
}

.time-table td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem 0.5rem;
    text-align: center;
    vertical-align: middle;
}

.time-table tr:first-child td {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    font-weight: 600;
    color: #1f2937;
}

.time-table .time-label {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 10;
}

.time-table td:not(.time-label) {
    transition: all 0.2s ease;
}

.time-table tr:hover td:not(.time-label) {
    background: #fffbeb;
}

/* ========== 信息卡片区域 ========== */

.info-section {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.info-card h3 {
    font-size: 1.3rem;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.info-card p {
    line-height: 1.8;
    color: #4b5563;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card ul li {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 4px solid #D2691E;
    transition: all 0.2s ease;
}

.info-card ul li:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(6px);
}

.info-card ul li strong {
    color: #8B4513;
}

/* ========== 响应式设计 ========== */

@media (max-width: 1200px) {
    .three-column-layout {
        grid-template-columns: 1fr;
    }

    .info-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .calendar-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .calendar-title {
        order: -1;
    }

    .calendar-day {
        min-height: 90px;
        padding: 6px;
    }

    .date-number {
        font-size: 1.1rem;
    }

    .lunar-date,
    .ganzhi {
        font-size: 0.65rem;
    }

    .day-tags .tag {
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    .almanac-detail {
        padding: 1rem;
    }

    .detail-title span:first-child {
        font-size: 1.3rem;
    }

    .time-table {
        font-size: 0.7rem;
    }

    .time-table td {
        padding: 0.4rem 0.2rem;
    }
} 