/* 文青風格主題 - Chuiyi's Website */

/* 自定義字體和基本樣式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@200;300;400;500;600;700&family=Noto+Sans+TC:wght@100;300;400;500;700&display=swap');

:root {
    /* 文青風格色彩調色盤 - 淺色主題 */
    --primary-beige: #f5f3f0;
    --warm-white: #fefcf9;
    --soft-gray: #e8e6e1;
    --muted-brown: #8b7d6b;
    --deep-brown: #6b5b47;
    --accent-gold: #d4af37;
    --text-dark: #3a3a3a;
    --text-light: #7a7a7a;
    --border-light: #e0ddd8;
    --shadow-subtle: rgba(0, 0, 0, 0.08);
    
    /* 間距系統 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
}

/* 深色主題變數 */
[data-theme="dark"] {
    --primary-beige: #2c2520;
    --warm-white: #1a1611;
    --soft-gray: #3a342c;
    --muted-brown: #b8a990;
    --deep-brown: #d4c4a8;
    --accent-gold: #f4d03f;
    --text-dark: #e8e6e1;
    --text-light: #b8b4ac;
    --border-light: #4a4136;
    --shadow-subtle: rgba(0, 0, 0, 0.3);
}

/* 基礎樣式重設 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px; /* 進一步微調滾動偏移 */
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--warm-white) !important;
    color: var(--text-dark);
    line-height: 1.7;
    font-weight: 300;
    padding-top: 80px; /* 為固定 navbar 留出空間 */
}

/* 標題字體使用襯線字體 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif TC', Georgia, serif;
    font-weight: 400;
    color: var(--text-dark);
    letter-spacing: 0.02em;
}

/* 導航欄文青風格 */
.navbar {
    background-color: var(--warm-white) !important;
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    padding: var(--spacing-sm) 0;
}

.navbar-brand {
    font-family: 'Noto Serif TC', Georgia, serif;
    font-weight: 500;
    color: var(--text-dark) !important;
    font-size: 1.4rem;
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    font-weight: 300;
    padding: var(--spacing-xs) var(--spacing-md) !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--deep-brown) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: var(--accent-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Hero 區域文青風格 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-beige) 0%, var(--soft-gray) 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 125, 107, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: var(--spacing-md);
    color: var(--deep-brown);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

/* 個人檔案圖片樣式 */
.profile-image-container {
    width: 300px;
    height: 300px;
    position: relative;
    margin: 0 auto;
    border: 3px solid var(--border-light);
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--soft-gray), var(--primary-beige));
    box-shadow: 0 8px 30px var(--shadow-subtle);
    transition: all 0.3s ease;
}

.profile-image-container:hover {
    transform: scale(1.05);
    border-color: var(--accent-gold);
    box-shadow: 0 12px 40px rgba(139, 125, 107, 0.2);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

/* 響應式個人檔案圖片 */
@media (max-width: 768px) {
    .profile-image-container {
        width: 200px;
        height: 200px;
        border-width: 2px;
    }
}

@media (max-width: 480px) {
    .profile-image-container {
        width: 150px;
        height: 150px;
    }
}

/* 按鈕文青風格 */
.btn-literary {
    background-color: transparent;
    border: 1.5px solid var(--muted-brown);
    color: var(--muted-brown);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-weight: 300;
    border-radius: 0;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-literary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--muted-brown);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-literary:hover {
    color: var(--warm-white);
    border-color: var(--muted-brown);
}

.btn-literary:hover::before {
    left: 0;
}

/* 區塊樣式 */
.section {
    padding: var(--spacing-xxl) 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--deep-brown);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background-color: var(--accent-gold);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: var(--spacing-xl);
    font-size: 1.1rem;
}

/* 文章卡片樣式 */
/* 統一 Flow Layout 卡片系統 */
.article-card {
    background-color: var(--warm-white);
    border: 1px solid var(--border-light);
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px var(--shadow-subtle);
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    min-height: 450px; /* 增加最小高度確保內容不被遮蓋 */
    height: auto; /* 允許自動調整高度 */
}

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

/* 統一的卡片圖片區域 */
.article-card .card-image {
    height: 200px; /* 統一圖片區域高度 */
    background: linear-gradient(135deg, var(--soft-gray), var(--primary-beige));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

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

.article-card:hover .card-image img {
    transform: scale(1.05);
}

.article-card .card-image i {
    font-size: 3rem;
    color: var(--muted-brown);
    opacity: 0.7;
}

/* 統一的卡片內容區域 */
.article-card .card-body {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    min-height: 240px; /* 確保內容區域有足夠高度 */
}

.article-card .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-sm); /* 確保與底部按鈕區域有間距 */
}

.article-card .card-title {
    font-family: 'Noto Serif TC', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--deep-brown);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8rem; /* 確保標題區域高度一致 */
}

.article-card .card-excerpt {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 減少到2行避免佔用太多空間 */
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    max-height: 3rem; /* 限制最大高度 */
}

.article-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: auto; /* 確保始終在底部 */
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0; /* 防止被壓縮 */
    min-height: 3rem; /* 確保按鈕區域有固定高度 */
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-card .card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-card .card-date {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
}

.article-card .card-date i {
    margin-right: var(--spacing-xs);
    font-size: 0.9rem;
}

/* 評分和標籤區域 */
.article-card .card-info {
    margin-bottom: var(--spacing-sm);
    min-height: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex-shrink: 0; /* 防止被壓縮 */
}

.rating {
    color: var(--accent-gold);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.rating i {
    margin-right: 2px;
    font-size: 0.8rem;
}

.rating span {
    margin-left: 0.3rem;
    font-size: 0.8rem;
}

/* 標籤樣式 */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tag {
    background-color: var(--soft-gray);
    color: var(--text-dark);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 400;
    display: inline-block;
    border: none;
    white-space: nowrap;
}

/* Flow Layout 容器 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    padding: 0;
    align-items: start; /* 確保卡片從頂部對齊 */
}

/* 響應式調整 */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .article-card {
        min-height: 400px; /* 手機版適當的最小高度 */
    }
    
    .article-card .card-image {
        height: 180px;
    }
    
    .article-card .card-body {
        min-height: 220px;
        padding: var(--spacing-sm);
    }
    
    .article-card .card-title {
        font-size: 1.1rem;
        min-height: 2.5rem; /* 調整手機版標題高度 */
    }
    
    .article-card .card-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        max-height: 2.5rem; /* 手機版描述高度 */
    }
    
    .article-card .card-meta {
        min-height: 2.5rem; /* 手機版按鈕區域高度 */
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .article-card .card-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .read-more-btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}

/* 載入動畫 */
.loading {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-light);
    font-style: italic;
}

.loading i {
    margin-right: var(--spacing-xs);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 卡片載入動畫 */
.article-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }

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

/* 讀取更多按鈕樣式 */
.read-more-btn {
    background: linear-gradient(135deg, var(--deep-brown), var(--muted-brown));
    color: var(--warm-white);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap; /* 防止按鈕文字換行 */
    flex-shrink: 0; /* 防止按鈕被壓縮 */
}

.read-more-btn:hover {
    background: linear-gradient(135deg, var(--muted-brown), var(--deep-brown));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--warm-white);
}

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

/* 調試樣式 - 可以暫時啟用來檢查佈局 */
/*
.article-card {
    border: 2px solid red !important;
}
.card-body {
    border: 1px solid blue !important;
}
.card-meta {
    border: 1px solid green !important;
}
*/

/* 移除舊的水平佈局樣式 */

/* 智能佈局樣式 */
.article-card.smart-layout[data-orientation="portrait"] .card-image {
    height: 300px; /* 直式圖片使用較高的容器 */
}

.article-card.smart-layout[data-orientation="landscape"] .card-image {
    height: 250px; /* 橫式圖片使用標準高度 */
}

.article-card.smart-layout.horizontal[data-orientation="portrait"] .card-image {
    width: 35%; /* 直式圖片在水平佈局中佔較小寬度 */
    height: 350px;
}

.article-card.smart-layout.horizontal[data-orientation="landscape"] .card-image {
    width: 45%; /* 橫式圖片在水平佈局中佔較大寬度 */
    height: 300px;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .article-card.smart-layout.horizontal {
        flex-direction: column;
    }
    
    .article-card.smart-layout.horizontal .card-image {
        width: 100% !important;
        height: 250px !important;
    }
    
    .article-card.smart-layout[data-orientation="portrait"] .card-image,
    .article-card.smart-layout[data-orientation="landscape"] .card-image {
        height: 220px; /* 手機版統一高度 */
    }
}

/* 水平佈局卡片（1-2篇文章時使用） */
.article-card.horizontal {
    display: flex;
    flex-direction: row;
    height: auto;
}

.article-card.horizontal .card-image {
    width: 40%;
    height: 300px;
    flex-shrink: 0;
}

.article-card.horizontal .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-card.horizontal .card-title {
    font-size: 1.6rem;
    margin-bottom: var(--spacing-md);
}

.article-card.horizontal .card-excerpt {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

/* 評分星星樣式 */
.rating {
    color: var(--accent-gold);
    margin-bottom: var(--spacing-sm);
}

.rating i {
    margin-right: 2px;
}

/* 標籤樣式 */
.tag {
    background-color: var(--soft-gray);
    color: var(--text-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 400;
    margin-right: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
    display: inline-block;
    border: none;
}

/* 讀取更多按鈕 */
.read-more-btn {
    background: none;
    border: 1px solid var(--muted-brown);
    color: var(--muted-brown);
    padding: 0.5rem 1.2rem;
    border-radius: 0;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.read-more-btn:hover {
    background-color: var(--muted-brown);
    color: var(--warm-white);
}

/* 響應式設計 */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px; /* 手機版進一步微調滾動偏移 */
    }
    
    body {
        padding-top: 70px; /* 手機版調整 navbar 空間 */
    }
    
    .navbar {
        padding: 0.5rem 0; /* 減少手機版 navbar 的 padding */
    }
    
    .navbar-brand {
        font-size: 1.2rem; /* 縮小品牌字體 */
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .article-card.horizontal {
        flex-direction: column;
    }
    
    .article-card.horizontal .card-image {
        width: 100%;
        height: 200px;
    }
}

/* Modal 文青風格 */
.modal-content {
    border-radius: 0;
    border: none;
    background-color: var(--warm-white);
    color: var(--text-dark);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    background-color: var(--primary-beige);
}

.modal-title {
    font-family: 'Noto Serif TC', Georgia, serif;
    color: var(--deep-brown);
}

.modal-body {
    color: var(--text-dark) !important;
    background-color: var(--warm-white);
}

.modal-body h1, .modal-body h2, .modal-body h3, 
.modal-body h4, .modal-body h5, .modal-body h6 {
    color: var(--deep-brown) !important;
}

.modal-body p, .modal-body li, .modal-body span,
.modal-body div {
    color: var(--text-dark) !important;
}

/* 確保在淺色主題下文字顯示為深色 */
[data-theme="light"] .modal-body,
.modal-body {
    color: #3a3a3a !important;
}

[data-theme="light"] .modal-body p,
[data-theme="light"] .modal-body li,
[data-theme="light"] .modal-body span,
[data-theme="light"] .modal-body div,
.modal-body p,
.modal-body li,
.modal-body span,
.modal-body div {
    color: #3a3a3a !important;
}

/* 深色主題下的 Modal 文字顏色 */
[data-theme="dark"] .modal-body {
    color: #e8e6e1 !important;
}

[data-theme="dark"] .modal-body p,
[data-theme="dark"] .modal-body li,
[data-theme="dark"] .modal-body span,
[data-theme="dark"] .modal-body div {
    color: #e8e6e1 !important;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    background-color: var(--primary-beige);
}

/* 按鈕樣式 */
.btn-secondary {
    background-color: var(--muted-brown);
    border-color: var(--muted-brown);
    color: var(--warm-white);
}

.btn-secondary:hover {
    background-color: var(--deep-brown);
    border-color: var(--deep-brown);
}

.btn-outline-info {
    border-color: var(--muted-brown);
    color: var(--muted-brown);
}

.btn-outline-info:hover {
    background-color: var(--muted-brown);
    border-color: var(--muted-brown);
    color: var(--warm-white);
}

/* 動畫效果 */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

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

/* 載入中狀態 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl);
    color: var(--text-light);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--muted-brown);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: var(--spacing-sm);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 攝影卡片樣式 */
/* 攝影畫廊容器樣式 */
#photography-gallery {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

#photography-gallery > div {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* 攝影畫廊佈局 - 最簡化版本 */
.photography-card {
    background: var(--warm-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    width: 100%; /* 確保卡片不會超出容器 */
    max-width: 100%; /* 防止溢出 */
    overflow: hidden; /* 防止內容溢出 */
    /* 移除所有 flex 和高度限制，讓內容自然流動 */
}

.photography-card:hover {
    transform: translateY(-2px);
    border-color: var(--muted-brown);
}

/* 深色主題下的攝影卡片 hover 效果 */
[data-theme="dark"] .photography-card:hover {
    box-shadow: 0 8px 25px rgba(212, 196, 168, 0.2);
}

/* 淺色主題下的攝影卡片 hover 效果 */
[data-theme="light"] .photography-card:hover,
.photography-card:hover {
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.15);
}

/* 攝影卡片內文字樣式 */
.photography-card .card-body {
    background-color: var(--warm-white) !important;
    border: 1px solid var(--border-light) !important;
    border-top: none !important;
    padding: 1.5rem;
    border-radius: 0 0 4px 4px;
}

/* 簡化描述文字樣式 */
.photography-card .card-excerpt {
    margin-bottom: 1rem;
}

.photography-card .card-title {
    color: var(--deep-brown) !important;
}

.photography-card .card-excerpt {
    color: var(--text-light) !important;
}

.photography-card .card-meta {
    color: var(--text-light) !important;
}

.photography-card .card-meta small {
    color: var(--text-light) !important;
}

.photography-card .tag {
    background-color: var(--soft-gray) !important;
    color: var(--text-dark) !important;
}

/* 攝影卡片按鈕樣式 */
.photography-card .btn-outline-primary {
    border-color: var(--muted-brown) !important;
    color: var(--muted-brown) !important;
}

.photography-card .btn-outline-primary:hover {
    background-color: var(--muted-brown) !important;
    border-color: var(--muted-brown) !important;
    color: var(--warm-white) !important;
}

.flickr-embed-container {
    width: 100%;
    max-width: 100%; /* 防止溢出 */
    background-color: var(--soft-gray);
    border-radius: 4px 4px 0 0;
    padding: 0;
    margin: 0;
    overflow: hidden; /* 防止內容溢出 */
    /* 完全移除高度限制，讓 Flickr 內容自然顯示 */
}

.flickr-embed-container a {
    display: block;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
}

.flickr-embed-container img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.photography-card:hover .flickr-embed-container img {
    transform: scale(1.05);
}

/* Flickr 嵌入樣式 - 最簡化版本 */
.flickr-embed-container [data-flickr-embed] {
    width: 100%;
    max-width: 100%;
    display: block;
}

.flickr-embed-container [data-flickr-embed] img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
}

/* 移除 iframe 的額外限制 */
.flickr-embed-container iframe {
    width: 100% !important;
    max-width: 100% !important;
    border: none;
}

/* 手機版專用樣式 */
@media (max-width: 768px) {
    .photography-card {
        margin-bottom: 1rem;
        border-radius: 8px; /* 手機版稍微增加圓角 */
    }
    
    .flickr-embed-container {
        border-radius: 8px 8px 0 0;
    }
    
    .photography-card .card-body {
        padding: 0.75rem !important; /* 手機版減少內邊距 */
        border-radius: 0 0 8px 8px !important;
    }
    
    .photography-card .card-title {
        font-size: 1.1rem !important; /* 手機版稍微縮小標題 */
    }
    
    /* 手機版按鈕和標籤調整 */
    .photography-card .card-meta {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
    
    .photography-card .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .photography-card .tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    /* 確保 Flickr 內容不會在手機版溢出 */
    .flickr-embed-container,
    .flickr-embed-container *,
    .flickr-embed-container iframe {
        max-width: 100% !important;
        overflow: hidden !important;
    }
}

/* 極小螢幕專用樣式（iPhone SE 等） */
@media (max-width: 480px) {
    .photography-card {
        margin-bottom: 0.75rem;
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .photography-card .card-body {
        padding: 0.5rem !important;
    }
    
    .photography-card .card-title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .photography-card .card-excerpt {
        font-size: 0.9rem;
        margin-bottom: 0.5rem !important;
    }
    
    .photography-card .tag {
        font-size: 0.75rem;
        padding: 0.15rem 0.3rem;
        margin-right: 0.25rem;
    }
    
    .photography-card .btn-sm {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

/* 主題切換按鈕樣式 */
.theme-toggle {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    background: var(--warm-white);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-subtle);
}

.theme-toggle:hover {
    background: var(--primary-beige);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 125, 107, 0.2);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--muted-brown);
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

/* 主題過渡動畫 */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 響應式主題切換按鈕 */
@media (max-width: 768px) {
    .theme-toggle {
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .theme-toggle i {
        font-size: 1.1rem;
    }
}
