/* ❀ 深温·小暖 - 温馨手账主题 v3.0 */
/* 💙 淡蓝→💜 淡紫渐变 · 毛玻璃 · 呼吸动画 · 动态爱心 */

/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #e8f4fd 0%, #f0e8ff 30%, #fce4ec 60%, #e8f4fd 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    background-attachment: fixed;
    min-height: 100vh;
    color: #4a4a6a;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 0%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 100%; }
    100% { background-position: 0% 50%; }
}

/* ===== 浮动爱心 ===== */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart-particle {
    position: absolute;
    font-size: 16px;
    opacity: 0;
    animation: heartFloat 8s ease-in infinite;
    pointer-events: none;
}

@keyframes heartFloat {
    0% { 
        transform: translateY(100vh) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% { 
        opacity: 0.6;
    }
    90% { 
        opacity: 0.6;
    }
    100% { 
        transform: translateY(-10vh) rotate(360deg) scale(1);
        opacity: 0;
    }
}

/* ===== 顶部主区域：左日历 + 右留言板 ===== */
.top-section {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ===== 左侧日历区域 ===== */
.left-calendar {
    flex: 1;
    min-width: 300px;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(100, 120, 200, 0.08);
    border: 1px solid rgba(180, 180, 240, 0.2);
    transition: all 0.3s ease;
}

.left-calendar:hover {
    box-shadow: 0 12px 40px rgba(100, 120, 200, 0.12);
    transform: translateY(-2px);
}

/* ===== 心形天数区域 ===== */
.heart-area {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid rgba(180, 180, 240, 0.15);
}

.heart-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.heart-icon {
    font-size: 36px;
    display: inline-block;
    animation: heartBeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 8px rgba(233, 30, 99, 0.2));
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.25); }
    30% { transform: scale(1); }
    45% { transform: scale(1.18); }
    60% { transform: scale(1); }
}

.heart-text {
    font-size: 18px;
    font-weight: 600;
    color: #5c5c8a;
}

.days-number {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #7c4dff, #e040fb, #ff4081);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.meet-date {
    font-size: 13px;
    color: #b39ddb;
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===== 日历卡片 ===== */
.calendar-card {
    width: 100%;
}

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

.calendar-header h3 {
    font-size: 17px;
    color: #5c5c8a;
    font-weight: 700;
}

.calendar-nav-btn {
    background: rgba(124, 77, 255, 0.08);
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 10px;
    transition: all 0.2s;
    color: #7c4dff;
}

.calendar-nav-btn:hover {
    background: rgba(124, 77, 255, 0.15);
    transform: scale(1.05);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}

.calendar-weekday {
    font-size: 12px;
    color: #b39ddb;
    padding: 6px 0;
    font-weight: 600;
}

.calendar-day {
    padding: 8px 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: #5c5c8a;
    position: relative;
}

.calendar-day:hover {
    background: rgba(124, 77, 255, 0.08);
    transform: scale(1.08);
}

.calendar-day.today {
    background: linear-gradient(135deg, #7c4dff, #e040fb);
    color: white;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(124, 77, 255, 0.25);
}

.calendar-day.has-memory {
    font-weight: 700;
    color: #7c4dff;
}

.calendar-day.has-memory::after {
    content: '✔';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #7c4dff;
}

.calendar-day.has-high-rating::after {
    content: '⭐';
    position: absolute;
    bottom: 1px;
    right: 2px;
    font-size: 7px;
}

.calendar-day.has-memory.today::after {
    color: rgba(255, 255, 255, 0.8);
}

.calendar-day.other-month {
    color: #d0d0e0;
}

.calendar-hint {
    margin-top: 12px;
    font-size: 12px;
    color: #b39ddb;
    text-align: center;
}

/* ===== 右侧留言板 ===== */
.right-message-board {
    flex: 1;
    min-width: 280px;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(100, 120, 200, 0.08);
    border: 1px solid rgba(180, 180, 240, 0.2);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.right-message-board:hover {
    box-shadow: 0 12px 40px rgba(100, 120, 200, 0.12);
    transform: translateY(-2px);
}

.msg-board-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.msg-board-icon {
    font-size: 22px;
}

.msg-board-title {
    font-size: 17px;
    font-weight: 700;
    color: #5c5c8a;
}

.msg-board-date {
    font-size: 12px;
    color: #b39ddb;
    margin-left: auto;
}

.msg-board-count {
    font-size: 12px;
    color: #b39ddb;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(180, 180, 240, 0.15);
}

.msg-board-list {
    flex: 1;
    overflow-y: auto;
    max-height: 260px;
    min-height: 120px;
    margin-bottom: 10px;
}

.msg-board-list::-webkit-scrollbar {
    width: 4px;
}

.msg-board-list::-webkit-scrollbar-thumb {
    background: #d0c4e8;
    border-radius: 2px;
}

.message-item {
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    animation: msgSlideIn 0.3s ease;
}

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

.message-item.user {
    background: linear-gradient(135deg, #e8e0ff, #f3e5f5);
    margin-right: 24px;
    border-bottom-left-radius: 4px;
    border-left: 3px solid #b388ff;
}

.message-item.ai {
    background: linear-gradient(135deg, #e0f2fe, #e8e0ff);
    margin-left: 24px;
    border-bottom-right-radius: 4px;
    border-right: 3px solid #81d4fa;
}

.message-item .msg-author {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
}

.message-item.user .msg-author { color: #7c4dff; }
.message-item.ai .msg-author { color: #0288d1; }

.message-item .msg-time {
    font-size: 11px;
    color: #c4c4d0;
    margin-top: 3px;
}

.message-item .msg-reply-btn {
    background: none;
    border: none;
    color: #7c4dff;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 3px;
    transition: background 0.2s;
}

.message-item .msg-reply-btn:hover {
    background: rgba(124, 77, 255, 0.08);
}

.message-item .reply-content {
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    font-size: 13px;
    border-left: 3px solid #b388ff;
}

.msg-board-input-area {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    border-top: 2px solid rgba(180, 180, 240, 0.15);
}

.msg-board-input-area input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid rgba(124, 77, 255, 0.15);
    border-radius: 12px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    background: rgba(248, 244, 255, 0.5);
}

.msg-board-input-area input:focus {
    border-color: #b388ff;
    background: white;
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.06);
}

.msg-board-input-area button {
    padding: 10px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #b388ff, #7c4dff);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
    font-weight: 600;
}

.msg-board-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(180, 180, 240, 0.15);
}

.msg-nav-btn {
    background: rgba(124, 77, 255, 0.06);
    border: 1px solid rgba(124, 77, 255, 0.1);
    padding: 4px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #7c4dff;
    transition: all 0.2s;
}

.msg-nav-btn:hover {
    background: rgba(124, 77, 255, 0.12);
    transform: scale(1.05);
}

.msg-nav-date {
    flex: 1;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #5c5c8a;
}

.msg-today-btn {
    font-size: 12px;
    padding: 4px 8px;
    background: rgba(124, 77, 255, 0.1);
}

.msg-board-input-area button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(124, 77, 255, 0.3);
}

/* ===== 导航栏 ===== */
.navbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(100, 120, 200, 0.04);
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid rgba(180, 180, 240, 0.15);
    max-width: 1200px;
    margin: 0 auto 0;
    border-radius: 0 0 16px 16px;
}

.navbar .brand {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #7c4dff, #e040fb, #ff4081);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.navbar .nav-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.navbar .nav-btn {
    background: rgba(124, 77, 255, 0.06);
    color: #5c5c8a;
    border: 1px solid rgba(124, 77, 255, 0.1);
    padding: 7px 14px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.navbar .nav-btn:hover {
    background: rgba(124, 77, 255, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(124, 77, 255, 0.08);
}

.navbar .nav-btn.refresh-btn:hover {
    transform: translateY(-1px) rotate(180deg);
}

/* ===== 主容器 ===== */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 16px 20px;
    position: relative;
    z-index: 1;
}

/* ===== 记忆类型选项卡 ===== */
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 8px 12px;
    box-shadow: 0 2px 10px rgba(100, 120, 200, 0.04);
    border: 1px solid rgba(180, 180, 240, 0.12);
}

.tab {
    padding: 7px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #7a7a9a;
    background: transparent;
    border: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tab:hover {
    background: rgba(124, 77, 255, 0.06);
    color: #7c4dff;
}

.tab.active {
    background: linear-gradient(135deg, #b388ff, #7c4dff);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 77, 255, 0.2);
}

/* ===== 字数统计卡片 ===== */
.stats-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 2px 10px rgba(100, 120, 200, 0.04);
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(180, 180, 240, 0.1);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(100, 120, 200, 0.08);
}

.stat-card .stat-label {
    font-size: 11px;
    color: #b39ddb;
    margin-bottom: 3px;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #7c4dff, #e040fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-unit {
    font-size: 10px;
    color: #c4c4d0;
}

/* ===== 分类筛选 ===== */
.category-bar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 8px 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(100, 120, 200, 0.04);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    border: 1px solid rgba(180, 180, 240, 0.1);
}

.category-tag {
    padding: 4px 12px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 12px;
    border: 1px solid rgba(124, 77, 255, 0.1);
    background: rgba(255, 255, 255, 0.5);
    color: #7c4dff;
    transition: all 0.2s;
    font-weight: 500;
}

.category-tag:hover {
    border-color: #b388ff;
    background: rgba(124, 77, 255, 0.04);
    transform: translateY(-1px);
}

.category-tag.active {
    background: linear-gradient(135deg, #b388ff, #7c4dff);
    border-color: transparent;
    color: white;
}

/* ===== 搜索框 ===== */
.search-box {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid rgba(124, 77, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.9);
    color: #4a4a6a;
}

.search-box:focus {
    outline: none;
    border-color: #b388ff;
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.06);
}

.search-box::placeholder {
    color: #c4c4d0;
}

/* ===== 记忆卡片列表 ===== */
.memories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.memory-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 2px 12px rgba(100, 120, 200, 0.04);
    transition: all 0.3s;
    border: 1px solid rgba(180, 180, 240, 0.15);
    border-left: 4px solid #b388ff;
    animation: cardFadeIn 0.4s ease;
}

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

.memory-card:hover {
    box-shadow: 0 6px 24px rgba(100, 120, 200, 0.08);
    transform: translateX(4px) translateY(-2px);
    border-color: rgba(180, 180, 240, 0.3);
}

.memory-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.memory-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: #4a4a6a;
    flex: 1;
}

.memory-card .card-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.memory-card:hover .card-actions {
    opacity: 1;
}

.memory-card .btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    background: transparent;
}

.memory-card .btn-icon:hover {
    background: rgba(124, 77, 255, 0.08);
}

.memory-card .btn-icon.btn-edit:hover { color: #7c4dff; }
.memory-card .btn-icon.btn-delete:hover { color: #e53935; background: rgba(229, 57, 53, 0.06); }

.memory-card .card-content {
    font-size: 14px;
    color: #7a7a9a;
    line-height: 1.6;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.memory-card .card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: #b39ddb;
    align-items: center;
}

.memory-card .category-badge {
    background: rgba(124, 77, 255, 0.06);
    color: #7c4dff;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
}

.memory-card .type-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
}

.type-badge.global { background: rgba(2, 136, 209, 0.06); color: #0288d1; }
.type-badge.keyword { background: rgba(198, 40, 40, 0.05); color: #c62828; }
.type-badge.private { background: rgba(84, 110, 122, 0.06); color: #546e7a; }

/* ===== 星级评分 ===== */
.star-rating {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}

.star-rating .star {
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    color: #e0e0e0;
}

.star-rating .star.active {
    color: #ffb74d;
    text-shadow: 0 0 6px rgba(255, 183, 77, 0.3);
}

.star-rating .star:hover {
    transform: scale(1.2);
}

.star-rating-display {
    display: inline-flex;
    gap: 1px;
    font-size: 14px;
}

.star-rating-display .star-filled { color: #ffb74d; }
.star-rating-display .star-empty { color: #e0e0e0; }

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

.empty-state .empty-icon {
    font-size: 56px;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

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

.empty-state .empty-text {
    font-size: 15px;
}

/* ===== 日期详情弹窗 ===== */
.date-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
    z-index: 500;
    justify-content: center;
    align-items: center;
}

.date-detail-modal.show { display: flex; }

.date-detail-content {
    background: white;
    border-radius: 24px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
    animation: slideUp 0.3s ease;
}

.date-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(124, 77, 255, 0.1);
}

.date-detail-header h3 {
    font-size: 18px;
    color: #5c5c8a;
}

.date-detail-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(124, 77, 255, 0.08);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.date-detail-close:hover { background: rgba(124, 77, 255, 0.15); }

.date-detail-item {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(124, 77, 255, 0.04);
    border-radius: 12px;
    border-left: 3px solid #b388ff;
}

.date-detail-item .dd-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #4a4a6a;
}

.date-detail-item .dd-content {
    font-size: 13px;
    color: #8888aa;
    white-space: pre-wrap;
    max-height: 80px;
    overflow-y: auto;
}

.date-detail-empty {
    text-align: center;
    padding: 30px;
    color: #b39ddb;
}

/* ===== 新增按钮（浮动） ===== */
.fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b388ff, #7c4dff);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(124, 77, 255, 0.3);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    font-weight: 300;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 24px rgba(124, 77, 255, 0.4);
}

/* ===== 模态框 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(6px);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

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

.modal {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.06);
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(180, 180, 240, 0.15);
}

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

.modal-header {
    padding: 20px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    background: linear-gradient(135deg, #7c4dff, #e040fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-header .close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(124, 77, 255, 0.08);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-header .close-btn:hover { background: rgba(124, 77, 255, 0.15); }

.modal-body { padding: 20px 24px; }
.modal-footer {
    padding: 0 24px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #7c4dff;
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(124, 77, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
    background: rgba(248, 244, 255, 0.3);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #b388ff;
    background: white;
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.06);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    padding: 10px 24px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #b388ff, #7c4dff);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 77, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124, 77, 255, 0.3);
}

.btn-secondary {
    background: rgba(124, 77, 255, 0.08);
    color: #7c4dff;
}

.btn-secondary:hover { background: rgba(124, 77, 255, 0.15); }

/* ===== 密码模态框 ===== */
.password-modal .password-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(124, 77, 255, 0.1);
    border-radius: 12px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
    transition: border-color 0.2s;
}

.password-modal .password-input:focus {
    outline: none;
    border-color: #b388ff;
}

.password-modal .password-error {
    color: #e53935;
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
    display: none;
}

.password-modal .password-error.show { display: block; }

/* ===== 分类管理 ===== */
.category-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(124, 77, 255, 0.08);
    gap: 10px;
}

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

.category-item .cat-icon {
    font-size: 18px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.category-item .cat-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #4a4a6a;
}

.category-item .cat-actions {
    display: flex;
    gap: 4px;
}

/* ===== 导出模态框 ===== */
.export-options {
    display: flex;
    gap: 10px;
    margin: 12px 0;
}

.export-option {
    flex: 1;
    padding: 14px;
    border: 2px solid rgba(124, 77, 255, 0.1);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
}

.export-option:hover {
    border-color: #b388ff;
    background: rgba(124, 77, 255, 0.04);
}

.export-option.selected {
    border-color: #b388ff;
    background: rgba(124, 77, 255, 0.06);
}

.export-option .opt-icon { font-size: 24px; margin-bottom: 4px; }
.export-option .opt-label { font-size: 13px; font-weight: 600; color: #4a4a6a; }

/* ===== 设置提示 ===== */
.setup-hint {
    text-align: center;
    padding: 8px;
    background: #fff8e1;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #f57f17;
    display: none;
}

.setup-hint.show { display: block; }

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0c4e8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c0a8e0; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .top-section {
        flex-direction: column;
        padding: 12px 14px;
        gap: 12px;
    }
    .left-calendar, .right-message-board {
        max-width: 100%;
        min-width: 0;
    }
    .navbar { margin: 0 10px; padding: 8px 16px; }
    .nav-label { display: none; }
    .days-number { font-size: 26px; }
    .heart-icon { font-size: 28px; }
    .heart-text { font-size: 15px; }
    .container { padding: 10px; }
    .tabs { padding: 6px 8px; gap: 4px; flex-wrap: wrap; }
    .tab { padding: 5px 10px; font-size: 12px; }
    .stats-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .fab { width: 48px; height: 48px; font-size: 22px; bottom: 20px; right: 20px; }
    .memory-card { padding: 12px 14px; }
    .memory-card .card-actions { opacity: 1; }
    .export-options { flex-direction: column; }
    .msg-board-list { max-height: 180px; }
}
