/* 预产期计算器样式 */
.due-date-calculator-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    padding: 60px 20px;
}

.due-date-calculator-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面头部 */
.calculator-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.calculator-title i {
    font-size: 32px;
}

.calculator-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.calculator-badge {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
    backdrop-filter: blur(10px);
}

/* 计算主体 */
.calculator-main {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* 输入区域 */
.calculator-inputs {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.input-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: #fa709a;
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.input-group label .unit {
    margin-left: auto;
    font-weight: 400;
    color: #888;
}

.input-group label i {
    color: #fa709a;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #fa709a;
    box-shadow: 0 0 0 3px rgba(250, 112, 154, 0.1);
}

.form-control::placeholder {
    color: #aaa;
}

.input-hint {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(250, 112, 154, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* 结果展示 */
.calculator-results {
    padding: 30px;
}

.result-header {
    margin-bottom: 20px;
}

/* 结果卡片 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result-card.primary {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #fff;
}

.result-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
}

.result-card:not(.primary) .result-icon {
    background: rgba(250, 112, 154, 0.1);
    color: #fa709a;
}

.result-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.8;
}

.result-value {
    font-size: 24px;
    font-weight: 700;
}

.result-value.highlight {
    font-size: 32px;
}

.result-hint {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* 时间线 */
.timeline-section {
    margin-bottom: 30px;
}

.details-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-title i {
    color: #fa709a;
}

.timeline {
    position: relative;
    padding-left: 30px;
    border-left: 3px solid #eee;
}

.timeline::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #fa709a 0%, #fee140 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #fa709a;
    transition: all 0.3s ease;
}

.timeline-item.passed .timeline-dot {
    background: #fa709a;
    border-color: #fa709a;
}

.timeline-item.current .timeline-dot {
    background: #fff;
    border-color: #fa709a;
    box-shadow: 0 0 0 6px rgba(250, 112, 154, 0.2);
}

.timeline-item.future .timeline-dot {
    background: #fff;
    border-color: #ddd;
}

.timeline-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.timeline-content p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* 孕周注意事项 */
.week-info {
    margin-bottom: 30px;
}

.info-box {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 12px;
    padding: 20px;
}

.info-box h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #856404;
}

.info-box p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.no-data {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* 孕期日历 */
.pregnancy-calendar {
    margin-bottom: 30px;
}

.calendar-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.calendar-grid {
    max-height: 400px;
    overflow-y: auto;
}

.calendar-week {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.calendar-week:last-child {
    border-bottom: none;
}

.week-header {
    font-weight: 600;
    color: #fa709a;
    min-width: 80px;
    flex-shrink: 0;
}

.week-dates {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.date-box {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #666;
    transition: all 0.3s ease;
}

.date-box.today {
    background: #fa709a;
    color: #fff;
}

.date-box.due-date {
    background: #fee140;
    color: #333;
}

.date-box.last-period {
    background: #e74c3c;
    color: #fff;
}

/* 说明 */
.tips-section {
    margin-bottom: 30px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tip-item {
    display: flex;
    gap: 16px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.tip-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(250, 112, 154, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fa709a;
    flex-shrink: 0;
}

.tip-content h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.tip-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #333;
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .due-date-calculator-section {
        padding: 30px 15px;
    }

    .calculator-title {
        font-size: 28px;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .result-value.highlight {
        font-size: 26px;
    }

    .tip-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .calendar-week {
        flex-direction: column;
    }

    .week-header {
        min-width: auto;
        margin-bottom: 8px;
    }
}