.calendar-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 992px) {
    .calendar-layout {
        grid-template-columns: 2.5fr 1fr;
    }
}

/* Main Calendar Area */
.calendar-main {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.current-date-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    flex-grow: 1;
    min-width: 150px;
}

.control-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    user-select: none;
}

.control-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.today-btn {
    background: var(--primary-color-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-weight: bold;
}

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

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.calendar-weekdays div {
    padding: 10px 0;
}

/* Weekend colors */
.calendar-weekdays div:first-child,
.calendar-weekdays div:last-child {
    color: var(--danger-color, #ff4d4f);
}

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

.day-cell {
    position: relative;
    min-height: 80px;
    padding: 5px;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: all 0.2s;
    background: var(--bg-secondary);
}

.day-cell:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.day-cell.other-month {
    opacity: 0.4;
    background: transparent;
}

.day-cell.today {
    background: var(--primary-color-light);
    border: 1px solid var(--primary-color);
}

.day-cell.selected {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.day-cell.selected .day-number,
.day-cell.selected .lunar-text,
.day-cell.selected .holiday-text,
.day-cell.selected .solar-term-text {
    color: white !important;
}

.day-number {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.lunar-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.holiday-text {
    font-size: 0.75rem;
    color: var(--danger-color, #ff4d4f);
    margin-top: 2px;
    font-weight: bold;
}

.solar-term-text {
    font-size: 0.75rem;
    color: var(--success-color, #52c41a);
    margin-top: 2px;
}

/* Sidebar */
.calendar-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.date-detail-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.date-detail-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.detail-day-week {
    font-size: 1.2rem;
    font-weight: bold;
}

.detail-full-date {
    font-size: 0.9rem;
    opacity: 0.9;
}

.detail-body {
    text-align: center;
}

.detail-day-big {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.lunar-info {
    margin-bottom: 20px;
}

.detail-lunar-date {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.detail-lunar-year {
    font-size: 0.9rem;
    opacity: 0.9;
}

.extra-info {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row .label {
    opacity: 0.8;
}

.info-row .value {
    font-weight: bold;
}

.clock-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.live-time {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    font-family: monospace;
}

.usage-guide {
    margin-top: 20px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
}

.usage-guide h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.usage-guide ul {
    padding-left: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .calendar-weekdays,
    .calendar-grid {
        font-size: 0.8rem;
    }

    .day-cell {
        min-height: 60px;
        padding: 2px;
    }

    .day-number {
        font-size: 1rem;
    }

    .lunar-text, .holiday-text, .solar-term-text {
        font-size: 0.6rem;
        transform: scale(0.9);
    }
}