/* 日历选择器组件样式 */

.calendar-picker {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.calendar-picker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #7c3aed, #a855f7, #7c3aed);
    animation: shimmer 2s ease-in-out infinite;
}

/* 日历头部 */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

.calendar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

.calendar-title i {
    color: #7c3aed;
    font-size: 1rem;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.calendar-btn {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: #7c3aed;
    color: #374151;
    transform: translateY(-1px);
}

.calendar-btn:active {
    transform: translateY(0);
}

.calendar-display {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

/* 日历内容 */
.calendar-content {
    margin-bottom: 20px;
}

/* 月份选择器 */
.month-picker {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.year-selector {
    display: flex;
    justify-content: center;
}

.year-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.year-item {
    background: rgba(249, 250, 251, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 80px;
}

.year-item:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.3);
}

.year-item.selected {
    background: rgba(124, 58, 237, 0.15);
    border-color: #7c3aed;
    color: #7c3aed;
}

.year-number {
    color: #374151;
    font-size: 0.9rem;
    font-weight: 600;
}

.year-name {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 2px;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.month-item {
    background: rgba(249, 250, 251, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.month-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.1), transparent);
    transition: left 0.5s ease;
}

.month-item:hover::before {
    left: 100%;
}

.month-item:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.month-item.selected {
    background: rgba(124, 58, 237, 0.15);
    border-color: #7c3aed;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.month-name {
    color: #374151;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.month-number {
    color: #c4b5fd;
    font-size: 0.8rem;
}

/* 日期选择器 */
.day-picker {
    display: flex;
    flex-direction: column;
}

.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.weekday {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 0;
}

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(249, 250, 251, 0.6);
    border: 1px solid transparent;
    color: #374151;
}

.calendar-day:not(.empty):hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.2);
    transform: translateY(-1px);
}

.calendar-day.selected {
    background: rgba(124, 58, 237, 0.15);
    border-color: #7c3aed;
    color: #7c3aed;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.2);
}

.calendar-day.today {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #2563eb;
}

.calendar-day.today.selected {
    background: rgba(124, 58, 237, 0.3);
    border-color: #7c3aed;
    color: #ffffff;
}

.calendar-day.empty {
    cursor: default;
    background: transparent;
}

.day-number {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 时辰选择器 */
.hour-picker {
    display: flex;
    flex-direction: column;
}

.hour-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.hour-item {
    background: rgba(249, 250, 251, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hour-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.1), transparent);
    transition: left 0.5s ease;
}

.hour-item:hover::before {
    left: 100%;
}

.hour-item:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.hour-item.selected {
    background: rgba(124, 58, 237, 0.15);
    border-color: #7c3aed;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.hour-name {
    color: #e0e7ff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.hour-time {
    color: #c4b5fd;
    font-size: 0.8rem;
}

/* 日历底部 */
.calendar-footer {
    display: flex;
    justify-content: center;
    padding-top: 15px;
    border-top: 1px solid rgba(124, 58, 237, 0.2);
}

.calendar-confirm-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.calendar-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
}

.calendar-confirm-btn:active {
    transform: translateY(0);
}

.calendar-confirm-btn i {
    font-size: 0.9rem;
}

/* 动画效果 */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .calendar-picker {
        padding: 15px;
        border-radius: 12px;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .calendar-controls {
        justify-content: center;
    }
    
    .year-list {
        gap: 8px;
    }
    
    .year-item {
        min-width: 70px;
        padding: 6px 10px;
    }
    
    .month-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .month-item {
        padding: 12px 8px;
    }
    
    .month-name {
        font-size: 0.8rem;
    }
    
    .month-number {
        font-size: 0.7rem;
    }
    
    .hour-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .hour-item {
        padding: 12px 8px;
    }
    
    .hour-name {
        font-size: 0.9rem;
    }
    
    .hour-time {
        font-size: 0.7rem;
    }
    
    .calendar-confirm-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .calendar-picker {
        padding: 12px;
        border-radius: 10px;
    }
    
    .calendar-title {
        font-size: 1rem;
    }
    
    .calendar-display {
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .year-list {
        gap: 6px;
    }
    
    .year-item {
        min-width: 60px;
        padding: 5px 8px;
    }
    
    .year-number {
        font-size: 0.8rem;
    }
    
    .year-name {
        font-size: 0.7rem;
    }
    
    .month-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .month-item {
        padding: 10px 6px;
    }
    
    .month-name {
        font-size: 0.75rem;
    }
    
    .month-number {
        font-size: 0.65rem;
    }
    
    .hour-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .hour-item {
        padding: 10px 6px;
    }
    
    .hour-name {
        font-size: 0.85rem;
    }
    
    .hour-time {
        font-size: 0.65rem;
    }
    
    .calendar-confirm-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* 白天主题适配 */
[data-theme="day"] .calendar-picker {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
}

[data-theme="day"] .calendar-picker::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
}

[data-theme="day"] .calendar-title {
    color: #1e40af;
}

[data-theme="day"] .calendar-title i {
    color: #3b82f6;
}

[data-theme="day"] .calendar-display {
    color: rgba(30, 64, 175, 0.8);
}

[data-theme="day"] .calendar-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #1e40af;
}

[data-theme="day"] .calendar-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

[data-theme="day"] .year-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

[data-theme="day"] .year-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="day"] .year-item.selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #1e40af;
}

[data-theme="day"] .year-number {
    color: #1e40af;
}

[data-theme="day"] .year-name {
    color: rgba(30, 64, 175, 0.8);
}

[data-theme="day"] .month-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

[data-theme="day"] .month-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="day"] .month-item.selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

[data-theme="day"] .month-name {
    color: #1e40af;
}

[data-theme="day"] .month-number {
    color: rgba(30, 64, 175, 0.8);
}

[data-theme="day"] .calendar-day {
    background: rgba(255, 255, 255, 0.8);
    color: #1e40af;
}

[data-theme="day"] .calendar-day:not(.empty):hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="day"] .calendar-day.selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #1e40af;
}

[data-theme="day"] .calendar-day.today {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #059669;
}

[data-theme="day"] .calendar-day.today.selected {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
    color: #1e40af;
}

[data-theme="day"] .weekday {
    color: rgba(30, 64, 175, 0.8);
}

[data-theme="day"] .hour-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

[data-theme="day"] .hour-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="day"] .hour-item.selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

[data-theme="day"] .hour-name {
    color: #1e40af;
}

[data-theme="day"] .hour-time {
    color: rgba(30, 64, 175, 0.8);
}

[data-theme="day"] .calendar-confirm-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

[data-theme="day"] .calendar-confirm-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* 精确小时选择器样式 */
.precise-hour-picker {
    padding: 0;
}

.hour-mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 5px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.mode-btn {
    flex: 1;
    padding: 10px 15px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mode-btn:hover {
    background: rgba(124, 58, 237, 0.08);
    color: #374151;
}

.mode-btn.active {
    background: rgba(124, 58, 237, 0.15);
    color: #7c3aed;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.mode-btn i {
    font-size: 0.8rem;
}

.hour-input-section {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(249, 250, 251, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.hour-input-group {
    margin-bottom: 15px;
}

.hour-input-group label {
    display: block;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

#hour-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 8px;
    color: #374151;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

#hour-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

#hour-input::placeholder {
    color: #6b7280;
}

.hour-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: rgba(124, 58, 237, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.selected-hour-display {
    display: flex;
    align-items: center;
    gap: 5px;
}

.hour-number {
    font-size: 2rem;
    font-weight: bold;
    color: #7c3aed;
    text-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

.hour-label {
    font-size: 1.2rem;
    color: #a855f7;
    font-weight: 500;
}

.traditional-hour-display {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 500;
    padding: 8px 15px;
    background: rgba(168, 85, 247, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.hour-grid-precise {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

.hour-item-precise {
    padding: 12px 8px;
    background: rgba(249, 250, 251, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hour-item-precise:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
}

.hour-item-precise.selected {
    background: rgba(124, 58, 237, 0.15);
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.hour-item-precise .hour-number {
    font-size: 1.1rem;
    font-weight: bold;
    color: #374151;
}

.hour-item-precise .hour-traditional {
    font-size: 0.8rem;
    color: #7c3aed;
    font-weight: 500;
}

.hour-item-precise .hour-range {
    font-size: 0.7rem;
    color: #9ca3af;
}

.hour-item-precise.selected .hour-number {
    color: #7c3aed;
}

.hour-item-precise.selected .hour-traditional {
    color: #a855f7;
}

.hour-item-precise.selected .hour-range {
    color: #d1d5db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hour-grid-precise {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .hour-item-precise {
        padding: 10px 6px;
    }
    
    .hour-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .mode-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hour-grid-precise {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hour-item-precise .hour-traditional {
        font-size: 0.7rem;
    }
    
    .hour-item-precise .hour-range {
        font-size: 0.6rem;
    }
}
