* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    color: #4a5568;
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.today-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.nav-btn-stats,
.nav-btn-album {
    flex: 1;
}

.header-actions .nav-btn {
    flex-shrink: 0;
}

.header h1 i {
    color: #667eea;
}

/* 宝宝年龄显示 */
.baby-age {
    color: #4a5568;
    font-size: 14px;
    white-space: normal;
    box-sizing: border-box;
    font-variant-numeric: tabular-nums;
}

.baby-age {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    line-height: 1.3;
}

.baby-age .age-title {
    font-size: 15px;
    color: #2d3748; /* 深灰，与整体标题色系相近 */
    font-weight: 700;
}

.baby-age .age-detail {
    font-size: 13px;
    color: #4a5568; /* 中灰，正文层级 */
    font-weight: 600;
}

.baby-age .age-days {
    font-size: 12px;
    color: #a0aec0; /* 浅灰，辅助信息 */
}

.baby-age .age-countdown {
    font-size: 12px;
    color: #718096;
}

.today-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.quick-select {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}


.quick-select-btn {
    background: #667eea;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #fff;
}

.quick-select-btn:hover {
    background: #5c4899;
}

/* 添加记录按钮 */
.add-record-section {
    margin-bottom: 20px;
    text-align: center;
}

.add-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

/* 喂奶时间提示样式 */
.feeding-reminder {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255);
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-left: 4px solid;
    animation: slideInDown 0.5s ease-out;
}

.feeding-reminder-green {
    border-left-color: #38a169;
    background: #f7fef9;
}

.feeding-reminder-yellow {
    border-left-color: #d69e2e;
    background: #fffeff;
}

.feeding-reminder-red {
    border-left-color: #e53e3e;
    background: #fef7f7;
}

.reminder-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.reminder-content i {
    font-size: 16px;
}

.feeding-reminder-green .reminder-content i {
    color: #38a169;
}

.feeding-reminder-yellow .reminder-content i {
    color: #d69e2e;
}

.feeding-reminder-red .reminder-content i {
    color: #e53e3e;
}

.feeding-reminder-green .reminder-content span {
    color: #2f855a;
}

.feeding-reminder-yellow .reminder-content span {
    color: #b7791f;
}

.feeding-reminder-red .reminder-content span {
    color: #c53030;
}

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

/* 记录容器 */
.records-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding-left: 40px;
    padding-top: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 20px;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #667eea 0%, #764ba2 50%, #667eea 100%);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.record-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 60px;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.record-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 15px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    border: 4px solid #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: all 0.3s ease;
}

.record-item:hover::before {
    transform: scale(1.1);
    left: -8px;
    box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.2), 0 6px 20px rgba(0, 0, 0, 0.2);
}

.record-item::after {
    content: '';
    position: absolute;
    left: 52px;
    top: 26px;
    width: 0;
    height: 0;
    border-left: 8px solid white;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    z-index: 1;
}

.record-content {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.record-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.2);
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.record-type {
    font-weight: 700;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(102, 126, 234, 0.05);
    transition: all 0.3s ease;
}

.record-type.feed {
    color: #38a169;
    background: rgba(56, 161, 105, 0.1);
}

.record-type.feed:hover {
    background: rgba(56, 161, 105, 0.15);
}

.record-type.diaper {
    color: #d69e2e;
    background: rgba(214, 158, 46, 0.1);
}

.record-type.diaper:hover {
    background: rgba(214, 158, 46, 0.15);
}

.record-time {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
    background: rgba(113, 128, 150, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

.record-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.record-amount {
    font-weight: 600;
    color: #667eea;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.record-note {
    font-size: 14px;
    color: #4a5568;
    font-style: italic;
    background: rgba(102, 126, 234, 0.05);
    padding: 12px 15px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    margin-top: 8px;
    position: relative;
    line-height: 1.5;
}

.record-note::before {
    content: '📝';
    margin-right: 8px;
    font-size: 14px;
}

.delete-btn {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #c53030, #a53030);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

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

/* 日期标题样式 */
.date-header {
    margin: 40px 0 25px 0;
    position: relative;
    padding-left: 60px;
}

.date-header h3 {
    color: #4a5568;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 5px 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 15px;
    display: inline-block;
    position: relative;
    border-left: 4px solid #667eea;
}

.date-header h3::before {
    content: '📅';
    margin-right: 8px;
    font-size: 16px;
}

.date-full {
    color: #a0aec0;
    font-size: 16px;
    font-weight: 500;
    margin-left: 5px;
    padding: 5px 15px;
    background: rgba(160, 174, 192, 0.1);
    border-radius: 10px;
    display: inline-block;
    margin-top: 5px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 20px auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    height: calc(100vh - 40px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #4a5568;
    font-size: 18px;
}

.close {
    color: #a0aec0;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #4a5568;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 优化选择框样式 */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select:hover {
    border-color: #cbd5e0;
    background-color: #f9fafb;
}

.form-group select:focus {
    border-color: #667eea;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 表单验证样式 */
.form-group.error select,
.form-group.error input,
.form-group.error textarea {
    border-color: #e53e3e;
}

.form-group.error .error-message {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: shake 0.5s ease-in-out;
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.form-group.error .error-message i {
    font-size: 14px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 必填字段标识 */
.form-group label.required::after {
    content: ' *';
    color: #e53e3e;
    font-weight: bold;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

.form-group textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px 0 0 0;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

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

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .nav-buttons {
        justify-content: center;
    }
    
    .header-actions .nav-btn {
        justify-content: center;
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .records-container {
        padding: 15px;
    }
    
    .timeline {
        padding-left: 30px;
        padding-top: 15px;
    }
    
    .timeline::before {
        left: 37px;
        width: 2px;
        top: 15px;
    }
    
    .record-item {
        padding-left: 45px;
        margin-bottom: 25px;
    }
    
    .record-item::before {
        left: -4px;
        width: 18px;
        height: 18px;
        border-width: 3px;
    }
    
    .record-item::after {
        left: 37px;
        border-left-width: 6px;
        border-top-width: 5px;
        border-bottom-width: 5px;
    }
    
    .record-content {
        padding: 15px;
        border-radius: 15px;
    }
    
    .record-type {
        font-size: 14px;
        padding: 5px 10px;
    }
    
    .record-time {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .date-header {
        padding-left: 45px;
        margin: 30px 0 20px 0;
    }
    
    .date-header h3 {
        font-size: 16px;
        padding: 8px 15px;
    }
    
    .date-full {
        font-size: 14px;
        padding: 4px 12px;
        margin-left: 3px;
    }
    
    .record-note {
        font-size: 13px;
        padding: 10px 12px;
        border-radius: 10px;
        border-left-width: 3px;
        margin-top: 6px;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #cbd5e0;
    opacity: 0.6;
}

.empty-state h3 {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 20px;
    font-weight: 600;
}

.empty-state p {
    font-size: 16px;
    color: #a0aec0;
    line-height: 1.5;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.loading i {
    font-size: 32px;
    color: #667eea;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 记录项的悬停效果增强 */
.record-item {
    transition: all 0.3s ease;
}

.record-item:hover {
    transform: translateX(5px);
}

/* 统计项的悬停效果 */
.stat-item {
    transition: all 0.3s ease;
    cursor: default;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

/* 时间线连接线动画 */
.timeline::before {
    animation: timelineGlow 3s ease-in-out infinite alternate;
}

@keyframes timelineGlow {
    from {
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
    }
    to {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    }
}

/* 统计页面样式 */
.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
    min-width: fit-content;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.nav-btn:hover i {
    transform: scale(1.1);
}

.date-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.date-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.date-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.current-date {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    padding: 10px 20px;
    background: #f7fafc;
    border-radius: 10px;
    min-width: 200px;
    text-align: center;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-content h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #718096;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
}

.daily-stats {
    margin: 40px 0;
}

.daily-stats h2 {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.daily-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.daily-stat-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.daily-stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.daily-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f7fafc;
}

.daily-stat-date {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.daily-stat-date-full {
    font-size: 14px;
    color: #718096;
}

.daily-stat-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.daily-stat-metric {
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-icon {
    font-size: 20px;
    width: 30px;
    text-align: center;
}

.metric-label {
    font-size: 14px;
    color: #718096;
    min-width: 60px;
}

.metric-value {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.charts-section {
    margin: 40px 0;
}

.charts-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.chart-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.chart-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.chart-card h3 {
    text-align: center;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    z-index: 10;
}

.chart {
    height: 300px;
    display: flex;
    align-items: end;
    justify-content: space-around;
    padding: 20px 0;
    position: relative;
}

.chart-bars {
    display: flex;
    align-items: end;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    gap: 10px;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    min-height: 20px;
    max-height: 300px;
}

.chart-bar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.chart-bar.poop-bar {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.bar-value {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #2d3748;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 5;
    white-space: nowrap;
}

.bar-label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

/* 折线图样式 */
.line-chart {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.line-chart svg {
    width: 100%;
    height: 100%;
}

/* ECharts图表容器样式 */
#heightChart,
#weightChart {
    width: 100%;
    height: 280px;
    min-height: 280px;
}

.no-data {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #718096;
    font-size: 16px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .daily-stats-container {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        grid-template-columns: 1fr;
    }
    
    .date-selector {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }
    
    .chart {
        height: 300px;
    }
    
    .chart-bar {
        max-width: 30px;
        max-height: 300px;
    }
} 

/* 相册页面样式 */
.add-photo-section {
    margin-bottom: 20px;
    text-align: center;
}

.photos-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    min-height: 400px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.photo-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.photo-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.photo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-image img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-overlay {
    transform: translateY(0);
}

.photo-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-date {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.photo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
}

.tag-more {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
}

/* 文件预览 */
.file-preview {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px dashed #e2e8f0;
}

.file-preview-item img {
    transition: transform 0.3s ease;
    border: 2px solid #e2e8f0;
}

.file-preview-item img:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.file-info {
    flex: 1;
    overflow: hidden;
}

.file-info div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 预览提示样式 */
.preview-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #718096;
    text-align: center;
    font-style: italic;
}

/* 编辑照片预览样式 */
.edit-photo-preview {
    margin-top: 10px;
    text-align: center;
}

.edit-photo-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 2px solid #e2e8f0;
}

.edit-photo-preview img:hover {
    transform: scale(1.05);
    border-color: #667eea;
}
.photo-viewer {
    position: relative;
}
/* 照片查看器 */
.photo-viewer {
    max-width: 800px;
    width: 90%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.photo-viewer .modal-header {
    flex-shrink: 0;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.photo-viewer .modal-body {
    height: calc(100% - 152px);
    padding: 20px;
    overflow-y: auto;
}

.photo-viewer .modal-footer {
    position: absolute; /* 固定到弹框底部 */
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    min-height: 80px;
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: flex-end; /* 靠右对齐 */
    padding: 0 20px; /* 左右内边距 */
    margin-top: 0; /* 清理原有外边距 */
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.photo-viewer-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
    overflow-y: auto;
}

.photo-image-container {
    text-align: center;
}

.photo-image-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-image-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.photo-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
}

.photo-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.photo-date {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

.photo-description {
    font-size: 14px;
    line-height: 1.6;
    color: #4a5568;
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
}

.photo-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.action-btn {
    min-width: 90px;
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.action-btn:hover {
    transform: translateY(-2px);
}

/* 照片查看弹框中的编辑按钮样式 */
.photo-viewer .action-btn.btn-secondary {
    background: #fff;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.photo-viewer .action-btn.btn-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

/* 编辑按钮使用界面背景色 */
.photo-viewer .action-btn:nth-child(2) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.photo-viewer .action-btn:nth-child(2):hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

.btn-danger:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.8;
}

/* loading 动画样式 */
.btn-loading {
  position: relative;
  padding-right: 30px; /* 预留加载图标位置 */
}

.btn-loading::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  border-top-color: white; /* 旋转时的高亮边 */
  animation: spin 1s linear infinite; /* 旋转动画 */
}

/* 旋转动画定义 */
@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* 相册统计 */
.album-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .photo-viewer-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .photo-image-container img {
        max-height: 300px;
    }
    
    .photo-overlay {
        transform: translateY(0);
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    }
    
    .photo-actions {
        gap: 10px;
    }
    
    .action-btn {
        min-width: 80px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .photos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .photo-image {
        height: 250px;
    }
    
    .photo-overlay {
        padding: 15px;
    }
    
    .photo-title {
        font-size: 14px;
    }
    
    .photo-date {
        font-size: 11px;
    }
    
    .photo-viewer .modal-content {
        position: relative;
        height: auto;
        max-height: calc(100vh - 60px);
        width: 98%;
        margin: 10px auto 120px auto;
    }
    
    .photo-actions {
        gap: 10px;
    }
    
    .action-btn {
        min-width: 80px;
        padding: 6px 12px;
        font-size: 11px;
    }
} 

/* 全屏预览样式 */
.fullscreen-modal {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000; /* 确保比编辑弹框层级更高 */
}

.fullscreen-content {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000;
    color: white;
}

.fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.fullscreen-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.fullscreen-info span {
    font-size: 14px;
    opacity: 0.8;
}

.fullscreen-actions {
    display: flex;
    gap: 10px;
}

/* 全屏关闭按钮样式 */
.close-btn {
    background: none !important;
    border: none !important;
    color: white !important;
    padding: 8px !important;
    border-radius: 50% !important;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.1);
}

.close-btn i {
    font-size: 16px;
}

.fullscreen-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

/* 全屏模式下的图片容器优化 */
.fullscreen-modal .fullscreen-image-container {
    padding: 0 8px;
    height: 100vh;
}

.fullscreen-modal .fullscreen-image-wrapper {
    width: 100%;
    height: 100vh;
}

.fullscreen-modal .fullscreen-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 退出全屏按钮样式 */
.exit-fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 20;
    font-size: 18px;
}

.exit-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.exit-fullscreen-btn:active {
    transform: scale(0.95);
}

.fullscreen-image-wrapper {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.fullscreen-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.fullscreen-image-container .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.fullscreen-image-container .nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.fullscreen-image-container .nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.nav-prev {
    left: 20px;
}

.nav-next {
    right: 20px;
}

.fullscreen-image-container .nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.fullscreen-image-container .nav-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%);
}

.fullscreen-footer {
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.photo-counter {
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.fullscreen-description {
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
    max-height: 60px;
    overflow-y: auto;
}

/* 模态框头部操作按钮 */
.modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 全屏按钮样式 */
.fullscreen-btn {
    background: none !important;
    border: none !important;
    color: #667eea !important;
    padding: 8px !important;
    border-radius: 50% !important;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(102, 126, 234, 0.1) !important;
    transform: scale(1.1);
}

.fullscreen-btn i {
    font-size: 16px;
}

/* 键盘导航提示 */
.fullscreen-content::before {
    content: '使用 ← → 键切换照片，ESC 键关闭';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.fullscreen-content.show-hint::before {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .fullscreen-header {
        padding: 15px;
    }
    
    .fullscreen-info h3 {
        font-size: 16px;
    }
    
    .fullscreen-info span {
        font-size: 12px;
    }
    
    .fullscreen-image-container .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .nav-prev {
        left: 10px;
    }
    
    .nav-next {
        right: 10px;
    }
    
    .fullscreen-footer {
        padding: 15px;
    }
    
    .fullscreen-content::before {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    /* 移动端退出全屏按钮样式 */
    .exit-fullscreen-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
} 

/* 文件大小限制提示 */
.file-size-limit {
    font-size: 12px;
    color: #718096;
    font-weight: normal;
}

/* 上传进度条样式 */
.upload-progress {
    margin-top: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #4a5568;
    text-align: center;
    font-weight: 500;
}

/* 压缩状态提示 */
.compression-status {
    font-size: 12px;
    color: #38a169;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.compression-status i {
    font-size: 14px;
}

/* 文件大小警告 */
.file-size-warning {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.file-size-warning i {
    font-size: 14px;
}

/* 上传按钮状态 */
.btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
} 

/* 登录页专属样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: rgba(255,255,255,0.97);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.15), 0 1.5px 8px rgba(118,75,162,0.08);
    padding: 40px 32px 32px 32px;
    max-width: 350px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modalSlideIn 0.4s;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}
.login-header i {
    font-size: 38px;
    color: #667eea;
    margin-bottom: 10px;
}
.login-header h1 {
    font-size: 26px;
    color: #4a5568;
    margin-bottom: 6px;
    font-weight: 700;
}
.login-header p {
    color: #888;
    font-size: 15px;
}

.login-form {
    width: 100%;
}
.login-form .form-group {
    margin-bottom: 22px;
}
.login-form label {
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: border 0.2s;
    background: #f7fafc;
}
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #667eea;
    background: #fff;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 13px 0;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
    transition: background 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.login-btn:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    box-shadow: 0 4px 16px rgba(102,126,234,0.13);
}

.error-message {
    margin-top: 18px;
    background: linear-gradient(135deg, #f56565, #c53030);
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(245,101,101,0.08);
    animation: slideInDown 0.3s;
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 24px 24px 24px;
        max-width: 94vw;
    }
} 

/* 分页加载指示器样式 */
.loading-indicator,
.photo-loading-indicator {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
}

.loading-indicator .loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* 去掉白色背景和边框 */
    /* background: rgba(255, 255, 255, 0.8); */
    /* border-radius: 15px; */
    /* backdrop-filter: blur(10px); */
    /* box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); */
}

.loading-indicator .loading i {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 10px;
}

.end-indicator,
.photo-end-indicator {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
}

.end-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

.end-text i {
    color: #38a169;
    font-size: 16px;
}

/* 滚动条样式优化 */
.timeline::-webkit-scrollbar {
    width: 6px;
}

.timeline::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.timeline::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.timeline::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

/* 分页加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.record-item {
    animation: fadeInUp 0.3s ease-out;
}

/* 加载状态优化 */
.loading-indicator .loading p {
    margin: 0;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

/* 响应式优化 */
@media (max-width: 480px) {
    .loading-indicator {
        padding: 15px;
        margin: 15px 0;
    }
    
    .loading-indicator .loading {
        padding: 15px;
    }
    
    .end-indicator {
        padding: 15px;
        margin: 15px 0;
    }
    
    .end-text {
        font-size: 13px;
        gap: 6px;
    }
    
    .end-text i {
        font-size: 14px;
    }
}

/* 下拉刷新指示器样式 */
.pull-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    font-size: 16px;
}

.pull-indicator i {
    font-size: 18px;
    transition: all 0.3s ease;
}

.pull-indicator i.fa-spinner {
    animation: spin 1s linear infinite;
}

.pull-indicator i.fa-arrow-down {
    animation: bounce 1s ease-in-out infinite;
}

/* 下拉刷新动画 */
@keyframes pullRefresh {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1px);
    }
}

/* 下拉刷新响应式优化 */
@media (max-width: 480px) {
    .pull-indicator {
        font-size: 14px;
        gap: 8px;
    }
    
    .pull-indicator i {
        font-size: 16px;
    }
} 

.header-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.header-title-row h1 {
  margin-bottom: 0;
}

/* Toast提示组件样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

/* 覆盖：移除 Toast 进度条 */
.toast::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

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

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast.success {
    border-left-color: #10b981;
    color: #065f46;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
    color: #991b1b;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.info {
    border-left-color: #3b82f6;
    color: #1e40af;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast.warning {
    border-left-color: #f59e0b;
    color: #92400e;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #6b7280;
}

/* Toast动画 */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
} 

/* 移动端上传组件样式（相册新增） */
.mobile-uploader {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mobile-uploader input[type="file"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.uploader-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f7fafc;
    border: 2px dashed #e2e8f0;
    cursor: pointer;
    transition: all 0.25s ease;
}
.uploader-card:hover {
    border-color: #667eea;
    background: #f8faff;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.12);
}
.uploader-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transition: all 0.25s ease;
}
.uploader-icon-circle i {
    font-size: 16px;
}
.uploader-text-title {
    font-size: 15px;
    color: #2d3748;
    font-weight: 600;
}
.uploader-text-subtitle {
    font-size: 12px;
    color: #718096;
}
.uploader-tip {
    font-size: 12px;
    color: #a0aec0;
    margin-left: 4px;
}
.uploader-card.selected {
    border-style: solid;
    border-color: #667eea;
    background: #edf2ff;
}
.uploader-card.selected .uploader-icon-circle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
@media (max-width: 480px) {
    .uploader-card {
        padding: 12px 14px;
    }
    .uploader-icon-circle {
        width: 38px;
        height: 38px;
    }
    .uploader-text-title {
        font-size: 14px;
    }
} 

/* 添加/编辑相册弹框：顶部/底部固定，中间滚动 */
#addPhotoModal .modal-content,
#editPhotoModal .modal-content,
#addModal .modal-content,
#editModal .modal-content {
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 避免外层产生滚动 */
}
#addPhotoModal .modal-header,
#editPhotoModal .modal-header,
#addModal .modal-header,
#editModal .modal-header {
    flex: 0 0 auto;
}
#addPhotoModal .modal-body,
#editPhotoModal .modal-body,
#addModal .modal-body,
#editModal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto; /* 只让中间区域滚动 */
    -webkit-overflow-scrolling: touch; /* 移动端流畅滚动 */
}
/* 保持底部操作区吸底（已在通用样式中 sticky），这里确保其在滚动容器内表现良好 */
#addPhotoModal .form-actions,
#editPhotoModal .form-actions,
#addModal .form-actions,
#editModal .form-actions {
    position: static; /* 覆盖全局 sticky */
    bottom: auto;
    height: 80px;
    min-height: 80px;
    align-items: center;
    padding: 0 0 0 0; /* 保证可视高度为80px */
}

/* 添加/编辑相册弹框：底部按钮固定在弹框底部（非粘性），中部滚动不覆盖 */
#addPhotoModal .modal-content,
#editPhotoModal .modal-content,
#addModal .modal-content,
#editModal .modal-content {
    position: relative; /* 作为绝对定位的参照 */
}
#addPhotoModal .form-actions,
#editPhotoModal .form-actions,
#addModal .form-actions,
#editModal .form-actions {
    position: absolute; /* 固定到弹框底部 */
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    min-height: 80px;
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: flex-end; /* 与原有对齐一致 */
    padding: 0 16px; /* 左右内边距 */
    margin-top: 0; /* 清理原有外边距 */
    background: #fff;
    border-top: 1px solid #e2e8f0;
}
#addPhotoModal .modal-body,
#editPhotoModal .modal-body,
#addModal .modal-body,
#editModal .modal-body {
    padding-bottom: 80px; /* 预留底部按钮空间，避免内容滚到按钮区域 */
}

@media (max-width: 480px) {
    #viewPhotoModal .modal-content,
    #addPhotoModal .modal-content,
    #editPhotoModal .modal-content,
    #addModal .modal-content,
    #addModal .modal-content,
    #editModal .modal-content {
        margin: 10px auto 120px auto; /* 小屏顶部再紧凑一些 */
        max-height: calc(100vh - 130px);
    }
} 

/* 日期输入框样式 */
.form-group input[type="date"] {
    width: auto;
    min-width: 200px;
    max-width: 300px;
}

/* 日期时间输入框样式 */
.form-group input[type="datetime-local"] {
    width: 100%;
    height: 44px;
    line-height: 44px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    /* iOS Safari 特殊处理 */
    -webkit-appearance: none;
    appearance: none;
}

.form-group input[type="datetime-local"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 移动端日期输入框样式 */
@media (max-width: 768px) {
    .form-group input[type="date"] {
        width: 100%;
        min-width: auto;
        max-width: none;
        /* iOS Safari 特殊处理 */
        -webkit-appearance: none;
        appearance: none;
        /* 确保在 iOS 上有正确的高度 */
        height: 44px;
        line-height: 44px;
        /* 修复 iOS 上的内边距问题 */
        padding: 10px 12px;
        /* 确保字体大小在 iOS 上不会缩放 */
        font-size: 16px;
        /* 修复 iOS 上的边框圆角 */
        border-radius: 10px;
    }
    
    /* iOS Safari 特殊处理 */
    .form-group input[type="date"]::-webkit-datetime-edit {
        padding: 0;
        line-height: 1.2;
    }
    
    .form-group input[type="date"]::-webkit-datetime-edit-fields-wrapper {
        padding: 0;
    }
    
    .form-group input[type="date"]::-webkit-datetime-edit-text {
        padding: 0 2px;
    }
    
    .form-group input[type="date"]::-webkit-datetime-edit-month-field,
    .form-group input[type="date"]::-webkit-datetime-edit-day-field,
    .form-group input[type="date"]::-webkit-datetime-edit-year-field {
        padding: 0 2px;
    }
    
    .form-group input[type="date"]::-webkit-calendar-picker-indicator {
        width: 20px;
        height: 20px;
        margin-left: 8px;
    }
    
    /* 移动端日期时间输入框样式 */
    .form-group input[type="datetime-local"] {
        width: 100%;
        height: 44px;
        line-height: 44px;
        padding: 10px 12px;
        font-size: 16px;
        border-radius: 10px;
        /* iOS Safari 特殊处理 */
        -webkit-appearance: none;
        appearance: none;
    }
}

/* 自定义对话框样式 */
.custom-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.custom-dialog {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: dialogSlideIn 0.3s ease-out;
}

@keyframes dialogSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 对话框头部 */
.custom-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.custom-dialog-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a202c;
}

.custom-dialog-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.custom-dialog-close:hover {
  color: #475569;
}

/* 对话框内容 */
.custom-dialog-body {
  padding: 20px 24px;
  flex: 1;
  overflow-y: auto;
  min-height: 100px;
}

.custom-dialog-body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #374151;
}

/* 对话框操作按钮 */
.custom-dialog-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  padding: 12px 24px 20px 24px !important;
  border-top: 1px solid #e2e8f0 !important;
}

.custom-dialog-btn {
  padding: 8px 16px !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  min-width: 60px !important;
}

.custom-dialog-btn-cancel {
  color: #475569;
  border: 1px solid #cbd5e1;
}

.custom-dialog-btn-cancel:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.custom-dialog-btn-confirm {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.custom-dialog-btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 媒体类型选择器样式 */
.media-type-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.media-type-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  justify-content: center;
  background: #f8fafc;
  position: relative;
}

.media-type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  margin: 0;
  width: 0;
  height: 0;
}

.media-type-option:hover {
  border-color: #667eea;
  background: #f0f4ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.media-type-option input[type="radio"]:checked + .media-type-icon {
  color: #667eea;
  transform: scale(1.1);
}

.media-type-option input[type="radio"]:checked ~ span {
  color: #667eea;
  font-weight: 600;
}

.media-type-option input[type="radio"]:checked ~ .media-type-icon {
  color: #667eea;
}

.media-type-option:has(input:checked),
.media-type-option.selected {
  border-color: #667eea;
  background: #f0f4ff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 使用JavaScript来添加选中状态的类 */
.media-type-option.selected {
  border-color: #667eea;
  background: #f0f4ff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.media-type-option.selected .media-type-icon {
  color: #667eea;
  transform: scale(1.1);
}

.media-type-option.selected span {
  color: #667eea;
  font-weight: 600;
}

.media-type-icon {
  font-size: 18px;
  color: #718096;
  transition: all 0.3s ease;
}

.media-type-option span {
  font-weight: 500;
  color: #4a5568;
  transition: all 0.3s ease;
}

/* 视频缩略图容器样式 */
.video-container {
  position: relative;
}

.media-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.media-type-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  transition: all 0.3s ease;
  pointer-events: none;
}


.photo-item:hover .media-type-indicator {
  transform: translate(-50%, -50%) scale(1.1);
}

/* 视频全屏预览样式 */
.fullscreen-modal video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* 编辑模态框中的视频预览 */
.edit-photo-preview video {
  width: 100%;
  max-height: 200px;
  border-radius: 8px;
  background: #000;
}

/* 文件预览中的视频样式 */
.file-preview-item video {
  border-radius: 8px;
  background: #000;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .media-type-selector {
    flex-direction: column;
    gap: 10px;
  }

  .media-type-option {
    padding: 10px 15px;
  }

  .media-type-icon {
    font-size: 16px;
  }

  .media-thumbnail {
    height: 150px;
  }
}

/* 取消上传按钮样式 */
.cancel-upload-btn {
  margin-top: 10px;
  padding: 8px 16px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.cancel-upload-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.cancel-upload-btn i {
  font-size: 12px;
}
