/* 日期差计算器专用样式 */

/* 区段标题 */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 快捷设置区域 */
.quick-actions-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.quick-action-btn:hover {
    background: var(--primary-color, #3b82f6);
    color: white;
    border-color: var(--primary-color, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.action-icon {
    font-size: 1.25rem;
}

.action-text {
    flex: 1;
}

/* 主计算区域 */
.calculation-section {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.date-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.datetime-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.datetime-group:hover {
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.datetime-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.datetime-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin: 0;
}

.quick-set-btn {
    background: none;
    border: 1px solid var(--primary-color, #3b82f6);
    color: var(--primary-color, #3b82f6);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-set-btn:hover {
    background: var(--primary-color, #3b82f6);
    color: white;
}

.datetime-inputs {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 1.5rem;
    align-items: end;
}

.date-input-wrapper,
.time-inputs-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
}

.date-input {
    padding: 0.75rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.time-input {
    width: 60px;
    padding: 0.5rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.time-input:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.time-unit {
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

.time-separator {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    margin: 0 0.25rem;
}

/* 分隔符 */
.date-separator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.separator-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color, #e5e7eb), transparent);
}

.separator-icon {
    font-size: 1.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50%;
    border: 1px solid var(--border-color, #e5e7eb);
}

/* 计算按钮 */
.calculate-button-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.calculate-btn {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color, #3b82f6) 0%, #1e40af 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

/* 特殊计算区域 */
.special-calculation-section {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.special-calculator-card {
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
}

.special-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.special-calc-btn {
    height: fit-content;
    padding: 0.75rem 1rem;
    width: 100%;
}

/* 特殊计算结果 */
.special-result-display {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    padding-top: 1.5rem;
}

.special-result-card {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.result-date-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color, #3b82f6);
    display: block;
    margin-bottom: 0.5rem;
}

.result-weekday {
    font-size: 1rem;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

.calculation-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    font-size: 0.95rem;
    color: var(--text-secondary, #6b7280);
}

.operation-sign {
    background: var(--primary-color, #3b82f6);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.result-date-highlight {
    font-weight: 600;
    color: var(--primary-color, #3b82f6);
}

/* 结果显示区域 */
.result-display-section {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: slideIn 0.5s ease-out;
}

.result-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-card {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-left: 4px solid var(--primary-color, #3b82f6);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.result-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.result-icon {
    font-size: 1.5rem;
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

.result-value {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.result-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
}

.result-unit {
    font-size: 1rem;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

/* 详细信息面板 */
.detailed-result-panel {
    background: #f8fafc;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
}

.detail-panel-header {
    background: var(--primary-color, #3b82f6);
    color: white;
    padding: 1rem 1.25rem;
}

.detail-panel-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.detail-panel-content {
    padding: 1.25rem;
}

.detailed-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.detail-info-item:hover {
    border-color: var(--primary-color, #3b82f6);
    transform: translateY(-1px);
}

.detail-icon {
    font-size: 1.25rem;
    width: 32px;
    text-align: center;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-primary, #1f2937);
    font-weight: 600;
}

/* 历史记录区域 */
.history-section {
    background: white;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.history-clear-btn {
    background: white;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-clear-btn:hover {
    background: #ef4444;
    color: white;
}

.history-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-card {
    background: #f8fafc;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.history-card:hover {
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.history-index {
    background: var(--primary-color, #3b82f6);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.history-timestamp {
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
}

.history-card-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: center;
}

.history-dates {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.history-date-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.date-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
}

.date-value {
    font-size: 0.9rem;
    color: var(--text-primary, #1f2937);
    font-weight: 500;
}

.date-arrow {
    font-size: 1.2rem;
    color: var(--primary-color, #3b82f6);
    font-weight: 600;
}

.history-result {
    text-align: right;
}

.result-summary {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color, #3b82f6);
    margin-bottom: 0.25rem;
}

.summary-days {
    font-size: 1.25rem;
}

.result-detail {
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
}

.history-card-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.history-action-btn {
    background: none;
    border: 1px solid var(--primary-color, #3b82f6);
    color: var(--primary-color, #3b82f6);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.history-action-btn:hover {
    background: var(--primary-color, #3b82f6);
    color: white;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary, #6b7280);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #1f2937);
}

.empty-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary, #6b7280);
}

/* 动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .datetime-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .time-inputs {
        justify-content: center;
    }

    .special-form-grid {
        grid-template-columns: 1fr;
    }

    .result-cards-grid {
        grid-template-columns: 1fr;
    }

    .detailed-info-grid {
        grid-template-columns: 1fr;
    }

    .history-card-content {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .history-result {
        text-align: left;
    }

    .history-dates {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .date-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .quick-action-btn {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1.25rem;
    }

    .action-icon {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .result-number {
        font-size: 1.5rem;
    }

    .calculation-summary {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
}
