/* ============================================
   Gallery Page Styles - 整理後完整版
   ============================================ */

/* --- 基礎頁面樣式 --- */
.page-gallery .page-content {
    background-color: rgba(255, 255, 255, 0.6);
    border-left-color: #d4a5a5;
}

.gallery-page-container {
    padding: 1rem 0;
}

/* --- 區塊標題 --- */
.section-title {
    font-family: var(--font-display);
    font-size: 1.8em;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-title .icon {
    width: 28px;
    height: 28px;
    fill: var(--accent-color);
}

/* --- 相本書架 --- */
.bookshelf-section {
    margin-bottom: 3rem;
}

.bookshelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(to bottom, #f5f0e8 0%, #e8e0d5 100%);
    border-radius: 10px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
}

.bookshelf::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, #d4c4b0, transparent);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* --- 相本卡片 --- */
.album-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    animation: fadeInUp 0.5s ease both;
}

.album-card:nth-child(1) { animation-delay: 0.05s; }
.album-card:nth-child(2) { animation-delay: 0.1s; }
.album-card:nth-child(3) { animation-delay: 0.15s; }
.album-card:nth-child(4) { animation-delay: 0.2s; }
.album-card:nth-child(5) { animation-delay: 0.25s; }

.album-card:hover {
    transform: translateY(-10px) rotateY(-5deg);
    box-shadow: 5px 15px 30px rgba(0,0,0,0.2);
}

.album-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, #8b6f47, #a08060);
    border-radius: 3px 0 0 3px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: white;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    z-index: 2;
}

.spine-title {
    letter-spacing: 2px;
}

.spine-count {
    font-size: 0.7em;
    opacity: 0.8;
    margin-top: 10px;
}

.album-cover {
    margin-left: 30px;
    height: 250px;
    border-radius: 0 5px 5px 0;
    overflow: hidden;
    position: relative;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.15);
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.album-card:hover .album-cover img {
    transform: scale(1.1);
}

.album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(60%);
    transition: transform 0.3s ease;
}

.album-card:hover .album-overlay {
    transform: translateY(0);
}

.album-overlay h4 {
    font-family: var(--font-display);
    font-size: 1.3em;
    margin-bottom: 0.5rem;
}

.album-overlay p {
    font-size: 0.85em;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.view-hint {
    font-size: 0.75em;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- 新增相本按鈕 --- */
.add-album-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.5em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.add-album-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* --- 相片展示櫃 --- */
.photo-showcase {
    animation: fadeIn 0.5s ease;
    display: none;
}

.showcase-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

/* 左側按鈕群組 */
.header-left {
    display: flex;
    gap: 10px;
    z-index: 10;
}

/* 返回書架按鈕 */
.back-to-shelf-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255,255,255,0.8);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-shelf-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-3px);
}

/* 新增相片按鈕 */
.add-photo-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.add-photo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* 相本標題置中 */
.album-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40%;
    margin: 0;
}

/* 右側檢視模式 */
.view-modes {
    display: flex;
    gap: 8px;
    z-index: 10;
}

.view-mode-btn, .slideshow-btn {
    padding: 8px 14px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.view-mode-btn:hover, .slideshow-btn:hover {
    background: rgba(255,255,255,0.9);
    transform: scale(1.05);
}

.view-mode-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* --- 相片容器 --- */
.photos-container {
    min-height: 500px;
    position: relative;
}

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

.photos-container.scatter-view {
    height: 600px;
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(circle at 20% 80%, rgba(209, 191, 167, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(168, 154, 142, 0.1) 0%, transparent 50%);
}

.photos-container.scatter-view .photo-card {
    position: absolute;
    width: 200px;
    transition: all 0.5s ease;
}

.photos-container.scatter-view .photo-card:hover {
    z-index: 100;
    transform: scale(1.2) rotate(0deg) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.photos-container.slideshow-active {
    opacity: 0.3;
    pointer-events: none;
}

/* --- 幻燈片層 --- */
#slideshow-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#slideshow-layer.active {
    opacity: 1;
    pointer-events: auto;
}

.slide-content {
    text-align: center;
    max-width: 90vw;
    max-height: 90vh;
}

.slide-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 10px solid white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.slide-caption {
    color: white;
    font-size: 1.5em;
    margin-top: 2rem;
    font-family: var(--font-display);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* --- 相片卡片 --- */
.photo-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-frame {
    background: white;
    padding: 10px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.15);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.photo-frame::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: rgba(255, 224, 130, 0.6);
    border-left: 1px dashed rgba(0,0,0,0.1);
    border-right: 1px dashed rgba(0,0,0,0.1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    z-index: 10;
}

.photo-frame img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}

.photo-meta {
    padding: 10px 5px 5px;
    text-align: center;
}

.photo-date {
    font-size: 0.75em;
    color: #999;
    display: block;
    margin-bottom: 5px;
}

.photo-caption {
    font-size: 0.9em;
    color: var(--text-color);
    margin: 0;
    font-family: var(--font-exchange);
}

/* --- 上傳彈窗 --- */
#photo-upload-modal, #add-album-modal {
    animation: fadeIn 0.3s ease;
}

#photo-upload-modal > div, #add-album-modal > div {
    animation: slideUp 0.3s ease;
}

#photo-preview img {
    animation: fadeIn 0.3s ease;
}

/* --- 點滴收藏盒 --- */
.memory-collection-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 3px double var(--border-color);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.collection-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.collection-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.collection-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--primary-color);
    border-radius: 15px 15px 0 0;
}

.item-icon {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 0.5rem;
}

.collection-item h4 {
    font-family: var(--font-display);
    font-size: 1.4em;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.collection-item > p {
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9em;
    margin-bottom: 1.5rem;
}

/* --- 捲動容器 --- */
.scrollable-container {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    margin-bottom: 1rem;
}

.scrollable-container::-webkit-scrollbar {
    width: 6px;
}

.scrollable-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.scrollable-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.scrollable-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* --- 夢想基金 --- */
.collection-item.dream-fund::before {
    background: linear-gradient(90deg, #ffd700, #ffed4e);
}

.dream-fund .item-icon {
    animation: pulse 2s infinite;
}

.fund-display {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 15px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 2px solid #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.fund-total {
    text-align: center;
    margin-bottom: 1rem;
}

.fund-label {
    display: block;
    font-size: 0.85em;
    color: #b8860b;
    margin-bottom: 5px;
    font-weight: bold;
}

.fund-amount {
    font-family: var(--font-display);
    font-size: 1.2em;
    color: #d4af37;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    display: block;
}

.fund-progress {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    border-radius: 5px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.3);
}

.fund-goal {
    display: block;
    text-align: center;
    font-size: 0.8em;
    color: #999;
}

.fund-records-container {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 0.5rem;
}

.fund-records {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fund-record {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.fund-record:hover {
    transform: translateX(3px);
}

.fund-record.income {
    border-left-color: #4caf50;
}

.fund-record.expense {
    border-left-color: #ff6b6b;
}

.record-info {
    flex: 1;
}

.record-date {
    font-size: 0.75em;
    color: #999;
    display: block;
    margin-bottom: 2px;
}

.record-note {
    font-size: 0.9em;
    color: var(--text-color);
    margin: 0;
}

.record-amount {
    font-weight: bold;
    font-size: 1.1em;
}

.record-amount.income {
    color: #4caf50;
}

.record-amount.expense {
    color: #ff6b6b;
}

.fund-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.fund-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 0.95em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.fund-btn.deposit {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.fund-btn.deposit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.fund-btn.withdraw {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.fund-btn.withdraw:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* --- 時間膠囊 --- */
.capsule-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.capsule-card {
    background: linear-gradient(135deg, #f5f0e8 0%, #e8e0d5 100%);
    border-radius: 10px;
    padding: 1rem;
    position: relative;
    border: 1px dashed #d4c4b0;
}

.capsule-date {
    font-size: 0.85em;
    color: var(--accent-color);
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.capsule-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75em;
    background: rgba(255,255,255,0.8);
    padding: 2px 8px;
    border-radius: 10px;
}

.capsule-status.locked {
    color: #999;
}

.capsule-status.unlocked {
    color: #4caf50;
}

.capsule-preview {
    font-size: 0.9em;
    color: #666;
    margin: 0;
    font-style: italic;
}

.capsule-content.scrollable-container {
    max-height: 180px;
}

.add-capsule-btn {
    background: transparent;
    border: 2px dashed var(--primary-color);
    color: var(--primary-color);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    margin-top: auto;
}

.add-capsule-btn:hover {
    background: var(--primary-color);
    color: white;
    border-style: solid;
}

/* --- 紀念日曆 --- */
.anniversary-calendar {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #90caf9;
}

.anniversary-calendar::before {
    background: linear-gradient(90deg, #2196f3, #64b5f6);
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    background: white;
    border-radius: 25px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #e3f2fd;
    color: #2196f3;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: #2196f3;
    color: white;
    transform: scale(1.1);
}

.calendar-header {
    font-family: var(--font-display);
    font-size: 1.3em;
    color: #1976d2;
    text-align: center;
}

.calendar-header .year {
    font-size: 0.8em;
    color: #666;
}

.calendar-header .month {
    font-size: 1.2em;
    color: #2196f3;
}

.month-highlight {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border-left: 4px solid #ffc107;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.highlight-icon {
    font-size: 2em;
}

.highlight-content {
    flex: 1;
}

.highlight-title {
    font-weight: bold;
    color: #333;
    font-size: 0.95em;
}

.highlight-days {
    font-size: 0.8em;
    color: #f57c00;
    font-weight: bold;
}

.anniversary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.anniversary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.anniversary-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.anniversary-card.anniversary { border-left-color: #e91e63; }
.anniversary-card.birthday { border-left-color: #9c27b0; }
.anniversary-card.first_date { border-left-color: #2196f3; }
.anniversary-card.proposal { border-left-color: #f44336; }
.anniversary-card.wedding { border-left-color: #ff9800; }
.anniversary-card.other { border-left-color: #757575; }

.anniv-date-box {
    text-align: center;
    min-width: 50px;
}

.anniv-day {
    font-family: var(--font-display);
    font-size: 1.8em;
    color: #2196f3;
    line-height: 1;
    display: block;
}

.anniv-weekday {
    font-size: 0.7em;
    color: #999;
    text-transform: uppercase;
}

.anniv-info {
    flex: 1;
}

.anniv-title {
    font-weight: bold;
    color: var(--text-color);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.anniv-icon {
    font-size: 1.1em;
}

.anniv-meta {
    font-size: 0.75em;
    color: #888;
    margin-top: 2px;
}

.anniv-years {
    font-size: 0.7em;
    color: #e91e63;
    font-weight: bold;
    margin-top: 2px;
}

.anniv-countdown {
    text-align: right;
    min-width: 60px;
}

.countdown-num {
    font-family: var(--font-display);
    font-size: 1.5em;
    color: #f57c00;
    display: block;
    line-height: 1;
}

.countdown-label {
    font-size: 0.65em;
    color: #999;
}

.countdown-today {
    background: linear-gradient(135deg, #e91e63, #f48fb1);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.year-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
}

.stat-item .stat-num {
    font-family: var(--font-display);
    font-size: 1.5em;
    color: #1976d2;
    display: block;
}

.stat-item .stat-label {
    font-size: 0.7em;
    color: #666;
}

.add-anniversary-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2196f3, #64b5f6);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: auto;
}

.add-anniversary-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(33,150,243,0.4);
}

.empty-month {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.empty-month-icon {
    font-size: 3em;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* --- 愛的存摺 --- */
.love-bank.redesigned {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border: 2px solid #ffcdd2;
}

.love-bank.redesigned::before {
    background: linear-gradient(90deg, #e91e63, #f48fb1);
}

.bank-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 1rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    font-size: 1.5em;
    display: block;
    margin-bottom: 5px;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 1.8em;
    color: #e91e63;
    display: block;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.7em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.total {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
}

.stat-card.this-month {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.stat-card.this-month .stat-value {
    color: #ff9800;
}

.stat-card.streak {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.stat-card.streak .stat-value {
    color: #9c27b0;
}

.category-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
    padding: 10px;
    background: rgba(255,255,255,0.6);
    border-radius: 10px;
}

.category-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: white;
    border-radius: 20px;
    font-size: 0.8em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.category-badge:hover {
    transform: scale(1.05);
}

.category-badge.care { border-color: #4caf50; color: #4caf50; }
.category-badge.surprise { border-color: #ff5722; color: #ff5722; }
.category-badge.accompany { border-color: #2196f3; color: #2196f3; }
.category-badge.gift { border-color: #9c27b0; color: #9c27b0; }
.category-badge.food { border-color: #ff9800; color: #ff9800; }
.category-badge.other { border-color: #757575; color: #757575; }

.category-badge .badge-count {
    background: currentColor;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: bold;
}

.bank-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #e91e63;
    color: white;
    border-color: #e91e63;
}

.category-filter {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.8em;
    background: white;
    cursor: pointer;
}

.bank-records-container {
    min-height: 200px;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 0.5rem;
}

.love-records-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.love-record-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.love-record-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.love-record-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(to left, rgba(233,30,99,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.love-record-card:hover::before {
    opacity: 1;
}

.love-record-card.care { border-left-color: #4caf50; }
.love-record-card.surprise { border-left-color: #ff5722; }
.love-record-card.accompany { border-left-color: #2196f3; }
.love-record-card.gift { border-left-color: #9c27b0; }
.love-record-card.food { border-left-color: #ff9800; }
.love-record-card.other { border-left-color: #757575; }

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

.record-title {
    font-weight: bold;
    color: var(--text-color);
    font-size: 0.95em;
    line-height: 1.4;
    flex: 1;
    padding-right: 10px;
}

.record-points-display {
    background: #9c27b022;
    color: #9c27b0;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.record-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75em;
    color: #888;
}

.record-category {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #f5f5f5;
    border-radius: 10px;
}

.record-category .cat-icon {
    font-size: 1.1em;
}

.record-doer {
    display: flex;
    align-items: center;
    gap: 4px;
}

.doer-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    font-weight: bold;
}

.doer-badge.me {
    background: #e3f2fd;
    color: #1976d2;
}

.doer-badge.partner {
    background: #fce4ec;
    color: #c2185b;
}

.quick-add-section {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#quick-deposit-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9em;
    margin-bottom: 8px;
    font-family: var(--font-body);
}

#quick-deposit-input:focus {
    outline: none;
    border-color: #e91e63;
}

.quick-add-options {
    display: flex;
    gap: 8px;
}

.quick-add-options select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.85em;
    background: white;
    cursor: pointer;
}

#quick-add-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #e91e63, #f48fb1);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#quick-add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(233,30,99,0.3);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.empty-state-icon {
    font-size: 3em;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* --- 興趣探索地圖 --- */
.map-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.map-category {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-category:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.map-category .category-icon {
    font-size: 1.5em;
}

.map-category .category-name {
    flex: 1;
    font-size: 0.9em;
}

.map-category .category-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
}

.map-category:hover .category-count {
    background: rgba(255,255,255,0.3);
}

/* --- 心情溫度計 --- */
.mood-chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 15px;
    height: 150px;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.mood-bar {
    width: 40px;
    border-radius: 20px 20px 5px 5px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mood-bar:hover {
    transform: scaleY(1.1);
}

.mood-emoji {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2em;
}

.log-mood-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    margin-top: auto;
}

.log-mood-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* --- 禮物清單 --- */
.gift-list-container {
    max-height: 150px;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 0.5rem;
}

.gift-items {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.gift-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid var(--primary-color);
}

.gift-item.completed {
    border-left-color: #4caf50;
    opacity: 0.7;
}

.gift-item[data-status="idea"] {
    border-left-color: #ffc107;
}

.gift-name {
    font-size: 0.9em;
    color: var(--text-color);
}

.gift-status {
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f0f0f0;
}

.gift-target {
    font-size: 0.55em;
    color: #999;
}

.add-gift-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 2px dashed var(--accent-color);
    color: var(--accent-color);
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    margin-top: auto;
}

.add-gift-btn:hover {
    background: var(--accent-color);
    color: white;
}

/* --- 空狀態通用 --- */
.empty-albums,
.empty-photos {
    animation: fadeIn 0.5s ease;
}

.empty-albums div,
.empty-photos div {
    animation: bounce 2s infinite;
}

/* --- 動畫定義 --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* --- 響應式調整 --- */
@media (max-width: 768px) {
    .section-title {
        flex-direction: column;
        gap: 1rem;
    }
    
    .add-album-btn {
        width: 100%;
        justify-content: center;
    }
    
    .bookshelf {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
    
    .album-cover {
        height: 180px;
    }
    
    .showcase-header {
        flex-wrap: wrap;
    }
    
    .album-title {
        order: -1;
        width: 100%;
        max-width: 100%;
        position: static;
        transform: none;
        margin-bottom: 10px;
    }
    
    .header-left,
    .view-modes {
        width: 100%;
        justify-content: center;
    }
    
    .add-photo-btn {
        margin-left: 0;
    }
    
    .photos-container.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .photos-container.scatter-view {
        height: 400px;
    }
    
    .photos-container.scatter-view .photo-card {
        width: 120px;
    }
    
    .collection-grid {
        grid-template-columns: 1fr;
    }
    
    .bank-dashboard {
        gap: 8px;
    }
    
    .stat-card .stat-value {
        font-size: 1.5em;
    }
    
    .quick-add-options {
        flex-wrap: wrap;
    }
    
    .quick-add-options select {
        flex: 1 1 45%;
    }
    
    #quick-add-btn {
        flex: 1 1 100%;
    }
    
    .scrollable-container {
        max-height: 150px;
    }
    
    .fund-amount {
        font-size: 1.8em;
    }
    
    .fund-actions {
        flex-direction: column;
    }
    
    #photo-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}