:root {
    --pink-grad: linear-gradient(135deg, #FF9A9E 0%, #A18CD1 100%);
    --pink-light: #FFE5E7;
    --pink: #FF9A9E;
    --blue-light: #E8F4FD;
    --blue: #A18CD1;
    --yellow-light: #FFF8E1;
    --yellow: #F6D365;
    --green-light: #E8F8F0;
    --green: #84fab0;
    --orange-light: #FFF3E0;
    --orange: #FDA085;
    --bg-main: #FFF5F7;
    --text-main: #333333;
    --text-muted: #888888;
    --card-radius: 24px;
    --btn-radius: 16px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
}

.page-container {
    min-height: 100vh;
}

/* 登录页面 */
.login-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 60px 20px;
}

.big-emoji {
    font-size: 80px;
    line-height: 1;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.title-text {
    font-weight: 700;
    background: var(--pink-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle-text {
    color: var(--text-muted);
}

.form-control {
    border-radius: 16px;
    border: 2px solid #F0E6E9;
    padding: 16px;
    font-size: 16px;
}

.input-group-text {
    border-radius: 16px;
    border: 2px solid #F0E6E9;
    border-left: none;
    padding: 16px;
    font-size: 16px;
    background: white;
    color: var(--text-muted);
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

.input-group .form-select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-bottom: 0;
}

.form-control:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 0.25rem rgba(255, 154, 158, 0.25);
}

.form-floating > label {
    padding: 16px;
}

.btn-primary {
    background: var(--pink-grad);
    border: none;
    border-radius: var(--btn-radius);
    padding: 16px;
    font-weight: 600;
    font-size: 18px;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 154, 158, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    border: none;
    border-radius: var(--btn-radius);
    padding: 16px;
    font-weight: 600;
    font-size: 18px;
    box-shadow: var(--shadow-soft);
}

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

/* 主页面 */
.top-nav {
    background: var(--pink-grad);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-soft);
}

.nav-emoji {
    font-size: 28px;
    margin-right: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}

.nav-emoji img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-name {
    font-weight: 600;
    color: white;
    font-size: 18px;
}

.main-content {
    padding: 20px 0 80px;
}

.welcome-section {
    margin-bottom: 24px;
}

.welcome-section h2 {
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-section p {
    color: var(--text-muted);
    margin: 0;
}

.dashboard-date {
    display: inline-flex;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 154, 158, 0.12);
    color: #d76b93;
    font-size: 13px;
    font-weight: 600;
}

.dashboard-date-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 22px;
}

.dashboard-date-input {
    flex: 1;
    min-width: 0;
    border-radius: 14px;
    border: 1px solid rgba(215, 107, 147, 0.18);
    box-shadow: 0 6px 18px rgba(215, 107, 147, 0.08);
}

.dashboard-date-step {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(255, 154, 158, 0.25);
}

.dashboard-date-step:disabled {
    opacity: 0.45;
    box-shadow: none;
}

/* 汇总卡片 */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.summary-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s;
}

.summary-card:active {
    transform: scale(0.98);
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 8px;
}

.bg-pink { background: var(--pink-light); }

.bg-purple {
    background: var(--blue-light);
}
.bg-blue { background: var(--blue-light); }
.bg-yellow { background: var(--yellow-light); }
.bg-orange { background: var(--orange-light); }
.bg-green { background: var(--green-light); }

.summary-value {
    font-size: 28px;
    font-weight: 700;
    background: var(--pink-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* 快速添加 */
.section-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.section-emoji {
    margin-right: 8px;
    font-size: 20px;
}

.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.action-btn {
    flex: 1;
    border: none;
    border-radius: var(--btn-radius);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s;
}

.action-btn:active {
    transform: scale(0.96);
}

.btn-pink { background: var(--pink-light); }
.btn-yellow { background: var(--yellow-light); }
.btn-green { background: var(--green-light); }

.action-emoji {
    font-size: 32px;
}

.action-text {
    font-weight: 600;
    font-size: 14px;
}

/* 记录列表 */
.records-list {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-emoji {
    font-size: 48px;
    margin-bottom: 12px;
}

.record-item {
    padding: 16px 20px;
    border-bottom: 1px solid #F5F0F2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.record-item:last-child {
    border-bottom: none;
}

.record-emoji {
    font-size: 28px;
    width: 40px;
    text-align: center;
}

.record-content {
    flex: 1;
}

.record-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.record-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}

.record-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.record-notes {
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 8px;
    margin-top: 6px;
    line-height: 1.4;
}

.record-time {
    font-size: 12px;
    color: var(--text-muted);
}

.record-actions {
    display: flex;
    gap: 8px;
}

.record-action-btn {
    border: none;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.record-action-btn.edit {
    background: rgba(255, 154, 158, 0.14);
    color: #d76b93;
}

.record-action-btn.delete {
    background: rgba(255, 182, 193, 0.2);
    color: #b03a5b;
}

/* 底部占位 */
.bottom-nav-spacer {
    height: 20px;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: flex-end;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal-container {
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

.modal-header h3 {
    font-weight: 600;
    font-size: 18px;
    margin: 0;
}

.modal-close {
    background: var(--pink-light);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.form-select, .form-control {
    margin-bottom: 16px;
}

.btn-submit {
    width: 100%;
    background: var(--pink-grad);
    border: none;
    border-radius: var(--btn-radius);
    padding: 16px;
    font-weight: 600;
    font-size: 16px;
    color: white;
    margin-top: 8px;
}

/* 成长趋势预览卡片 */
.chart-preview-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.chart-preview-title {
    font-weight: 600;
    font-size: 15px;
}

.chart-preview-container {
    height: 180px;
}

.text-pink {
    color: var(--pink);
    font-weight: 500;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.bottom-nav-item {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.bottom-nav-item.active {
    background: var(--pink-light);
}

.bottom-nav-emoji {
    font-size: 24px;
}

.bottom-nav-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.bottom-nav-item.active .bottom-nav-text {
    color: var(--pink);
    font-weight: 600;
}

.bottom-nav-spacer {
    height: 70px;
}

/* 统计图表页面 */
.range-selector {
    display: flex;
    gap: 8px;
    background: white;
    padding: 8px;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-soft);
}

.range-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.range-btn.active {
    background: var(--pink-grad);
    color: white;
}

/* 图表标签页 */
.chart-tabs {
    background: white;
    border-radius: var(--card-radius);
    padding: 8px;
    box-shadow: var(--shadow-soft);
    border: none;
}

.chart-tabs .nav-link {
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    color: var(--text-muted);
    font-weight: 500;
}

.chart-tabs .nav-link:hover {
    color: var(--pink);
}

.chart-tabs .nav-link.active {
    background: var(--pink-grad);
    color: white;
}

/* 图表卡片 */
.chart-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 16px;
}

.chart-card-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 16px;
}

.chart-container {
    height: 280px;
}

/* 桌面端适配 */
@media (min-width: 768px) {
    .summary-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .modal-overlay {
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .modal-container {
        border-radius: 24px;
        max-width: 480px;
    }

    .chart-preview-container {
        height: 200px;
    }

    .chart-container {
        height: 320px;
    }

    .bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 24px 24px 0 0;
    }
}

/* 喂养提醒卡片 */
.feeding-reminder-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.reminder-icon {
    font-size: 40px;
    background: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reminder-content {
    flex: 1;
    color: white;
}

.reminder-title {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.reminder-time {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
}

.reminder-countdown {
    font-size: 13px;
    opacity: 0.85;
}

.reminder-countdown.urgent {
    color: #ffe66d;
    font-weight: bold;
}

.reminder-countdown.overdue {
    color: #ff6b6b;
    font-weight: bold;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.btn-pink.btn-sm {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-pink.btn-sm:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 记录类型筛选器 */
.record-type-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.filter-record-type {
    border: none;
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    color: #6c757d;
}

.filter-record-type:hover {
    background: #e9ecef;
}

.filter-record-type.active {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: white;
    font-weight: 500;
}

/* 记录项样式区分 */
.record-item.feeding {
    border-left: 4px solid #ff9a9e;
}

.record-item.diaper {
    border-left: 4px solid #ffd89b;
}

.record-item.growth {
    border-left: 4px solid #84fab0;
}
