/* 移动端老黄历样式 */

.mobile-body {
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.mobile-main {
    padding: 10px;
    max-width: 100%;
    overflow-x: hidden;
}

/* 头部 */
.mobile-header {
    text-align: center;
    padding: 15px 0;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border-radius: 12px;
    margin-bottom: 15px;
}

.mobile-header h1 {
    font-size: 1.5rem;
    margin: 0 0 5px 0;
}

.mobile-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 导航栏 */
.mobile-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.nav-arrow {
    width: 40px;
    height: 40px;
    border: none;
    background: #D2691E;
    color: white;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-arrow:active {
    transform: scale(0.95);
    background: #8B4513;
}

.mobile-title {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #8B4513;
}

.mobile-select {
    padding: 6px 10px;
    border: 2px solid #D2691E;
    border-radius: 6px;
    background: white;
    color: #8B4513;
    font-size: 1rem;
    font-weight: 600;
}

.mobile-today-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(67, 233, 123, 0.3);
}

.mobile-today-btn:active {
    transform: scale(0.98);
}

/* 月历 */
.mobile-calendar {
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.mobile-weekdays div {
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.9rem;
}

.mobile-weekdays div:first-child,
.mobile-weekdays div:last-child {
    color: #ef4444;
}

.mobile-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.mobile-day {
    aspect-ratio: 1;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-day:active {
    transform: scale(0.95);
    background: #fff7ed;
}

.mobile-day.other-month {
    opacity: 0.3;
}

.mobile-day.today {
    background: linear-gradient(135deg, #fed7aa, #D2691E);
    border-color: #D2691E;
}

.mobile-day.today .day-num {
    color: white;
    font-weight: 700;
}

.day-num {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.day-lunar {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 2px;
}

/* 底部抽屉 */
.mobile-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.mobile-drawer.show {
    transform: translateY(0);
}

.drawer-handle {
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 12px auto;
}

.drawer-content {
    padding: 0 20px 20px;
    overflow-y: auto;
    max-height: calc(80vh - 28px);
}

.drawer-header {
    text-align: center;
    padding: 15px 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 15px;
}

.drawer-header h2 {
    font-size: 1.3rem;
    color: #8B4513;
    margin: 0 0 8px 0;
}

.drawer-header p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

.drawer-body {
    margin-bottom: 60px;
}

.drawer-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.drawer-section:last-child {
    border-bottom: none;
}

.drawer-section h3 {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    color: #1f2937;
}

.drawer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drawer-tags .tag {
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #4b5563;
}

.drawer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drawer-list li {
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.drawer-list li strong {
    color: #8B4513;
}

.drawer-section.expandable h3 {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-icon {
    font-size: 0.8rem;
    color: #6b7280;
}

.time-content {
    margin-top: 10px;
}

.drawer-times {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.time-item {
    text-align: center;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.time-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
    margin-bottom: 4px;
}

.time-range {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-bottom: 4px;
}

.time-status {
    font-size: 0.85rem;
    color: #059669;
    font-weight: 600;
}

.drawer-close {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 14px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.drawer-close:active {
    transform: scale(0.98);
}

/* 遮罩层 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 适配不同屏幕 */
@media (min-width: 375px) {
    .day-num {
        font-size: 1.2rem;
    }

    .day-lunar {
        font-size: 0.75rem;
    }
}

@media (min-width: 768px) {
    .mobile-main {
        max-width: 600px;
        margin: 0 auto;
    }

    .mobile-drawer {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
    }

    .mobile-drawer.show {
        transform: translateX(-50%) translateY(0);
    }
}
