/* 全局設定 */
:root {
    --bg-gradient: #f5f7fa;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-hover: rgba(255, 255, 255, 1);
    --text-main: #2d3436;
    --text-sub: #636e72;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

/* 深色模式支援 (可選) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-gradient: #2b2b2b;
        --card-bg: rgba(40, 40, 40, 0.6);
        --card-hover: rgba(60, 60, 60, 0.9);
        --text-main: #dfe6e9;
        --text-sub: #b2bec3;
    }
    
    /* 深色模式下的背景色 */
    .category-section:nth-child(4), /* 社群媒體 */
    .category-section:nth-child(6) { /* 電子書販售 */
        background: #2b2b2b; /* 深色模式下的白色區塊背景 */
    }
    
    .category-section:nth-child(5), /* 付費訂閱 */
    .category-section:nth-child(7) { /* 實體商品通販 */
        background: #343a40; /* 深色模式下的灰色區塊背景 */
    }
    
    /* 深色模式下的側邊欄樣式 */
    .sidebar {
        background: rgba(35, 35, 35, 0.95);
        border-right-color: rgba(255, 255, 255, 0.1);
    }
    
    .nav-header {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .nav-link:hover {
        background: rgba(52, 152, 219, 0.15);
    }
    
    .nav-link.active {
        background: rgba(52, 152, 219, 0.2);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans TC', 'Noto Sans JP', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--text-main);
}

/* 佈局容器 */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 側邊導航欄 */
.sidebar {
    width: 140px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

/* 導航頭部 */
.nav-header {
    padding: 20px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.nav-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

/* 導航菜單 */
.nav-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 15px 10px;
    text-decoration: none;
    color: var(--text-sub);
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    text-align: center;
}

.nav-link:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.nav-link.active {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border-left-color: #3498db;
}

.nav-text {
    font-size: 1rem;
}

/* 主內容區域 */
.main-content {
    flex: 1;
    margin-left: 140px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.main-content.gallery-active {
    justify-content: flex-start;
    padding-right: 0;
}

/* 頁面內容 */
.page-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page-content.active {
    display: block;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    width: 100%;
}

.main-content.gallery-active .container {
    max-width: none;
    margin: 0;
    padding-right: 0;
}

/* 画廊页面容器特殊样式 */
#page-gallery {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* 頁面淡入動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 頁面標題樣式 */
.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

/* 畫廊頁面標題特殊樣式 */
#page-gallery .page-header {
    padding: 20px 15px;
    margin-bottom: 0;
    text-align: center;
}

/* 委託和畫廊頁面內容 */
.commission-content {
    padding: 40px 20px;
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
}

/* 畫廊網格佈局 (Pinterest 瀑布流風格) */
.gallery-content {
    padding: 20px 0;
    width: 100%;
    max-width: none;
    overflow-x: visible;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 5px;
    gap: 15px;
    width: 100%;
    margin: 0;
    padding: 0;
    align-items: start;
}

.gallery-item {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    width: 100%;
    display: block;
    height: max-content;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-info {
    padding: 15px;
    text-align: center;
}

.gallery-item-title {
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 5px 0;
    font-size: 0.9rem;
}

.gallery-item-desc {
    color: var(--text-sub);
    font-size: 0.8rem;
    margin: 0;
}

.gallery-item-count {
    color: #3498db;
    font-size: 0.75rem;
    font-weight: 500;
    display: block;
    margin-top: 5px;
}

/* 畫廊浮層 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    gap: 30px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-image-container {
    position: relative;
    max-height: 80vh;
}

.lightbox-image {
    max-width: 60vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 8px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-arrow {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    pointer-events: all;
}

.lightbox-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-prev {
    margin-left: 10px;
}

.lightbox-next {
    margin-right: 10px;
}

.lightbox-info {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: var(--radius-lg);
    max-width: 300px;
    text-align: center;
}

.lightbox-title {
    color: var(--text-main);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.lightbox-desc {
    color: var(--text-sub);
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.lightbox-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-links-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.lightbox-link-icon {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-link-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-link-icon:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-counter {
    color: var(--text-sub);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

/* 年齡驗證樣式 */
.age-verification-overlay {
    backdrop-filter: blur(20px) !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
}

.age-verification-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.95));
    border-radius: 20px;
    padding: 50px 30px 45px 30px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    position: relative;
}

.age-verification-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #20c997, #6f42c1);
    border-radius: 20px 20px 0 0;
}

.age-verification-header h2 {
    margin: 0 0 25px 0;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.age-verification-body p {
    margin-bottom: 40px;
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.age-verification-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 auto 30px auto; /* 這裡把 0 改成了 30px，增加下方間距 */
    max-width: 280px;
}

.btn-adult, .btn-minor {
    padding: 14px 22px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 120px;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.btn-adult {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-adult:hover {
    background: linear-gradient(135deg, #218838 0%, #1eb88a 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.4);
}

.btn-minor {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-minor:hover {
    background: linear-gradient(135deg, #c82333 0%, #d91a72 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(220, 53, 69, 0.4);
}

.btn-adult:active, .btn-minor:active {
    transform: translateY(-1px) scale(0.98);
}

/* 手機版年齡驗證調整 */
@media (max-width: 480px) {
    .age-verification-content {
        padding: 35px 25px 30px 25px;
        margin: 20px;
        width: calc(100% - 40px);
        max-width: none;
    }
    
    .age-verification-header h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .age-verification-body p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .age-verification-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-adult, .btn-minor {
        width: 100%;
        padding: 16px 30px;
        font-size: 1.05rem;
    }
}

/* 畫廊毛玻璃遮罩 */


/* 響應式畫廊 - 根據螢幕寬度自動調整列數 */

/* 超小手機 */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        padding: 0;
    }
    
    .gallery-content {
        padding: 15px 0;
    }
    
    #page-gallery .page-header {
        padding: 15px 5px;
    }
}

/* 手機橫向 / 小平板 */
@media (min-width: 481px) and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
        padding: 0;
    }
    
    .gallery-content {
        padding: 20px 0;
    }
    
    #page-gallery .page-header {
        padding: 20px 8px;
    }
}

/* 平板 */
@media (min-width: 769px) and (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        width: 100%;
        padding: 0;
    }
    
    .gallery-content {
        padding: 20px 0;
    }
    
    #page-gallery .page-header {
        padding: 20px 10px;
    }
}

/* 小桌機 / 筆電 */
@media (min-width: 1025px) and (max-width: 1440px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        width: 100%;
        padding: 0;
    }
    
    .gallery-content {
        padding: 20px 0;
    }
    
    #page-gallery .page-header {
        padding: 20px 10px;
    }
}

/* 大桌機 */
@media (min-width: 1441px) and (max-width: 1920px) {
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
        width: 100%;
        padding: 0;
    }
    
    .gallery-content {
        padding: 20px 0;
    }
    
    #page-gallery .page-header {
        padding: 20px 10px;
    }
}

/* 超寬螢幕 */
@media (min-width: 1921px) {
    .gallery-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
        width: 100%;
        padding: 0;
    }
    
    .gallery-content {
        padding: 20px 0;
    }
    
    #page-gallery .page-header {
        padding: 20px 15px;
    }
}

/* 響應式燈箱調整 */
@media (max-width: 768px) {
    
    .lightbox-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .lightbox-image {
        max-width: 90vw;
        max-height: 50vh;
    }
    
    .lightbox-info {
        max-width: 90vw;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .lightbox-image {
        max-height: 60vh;
    }
}

/* 移動端菜單按鈕 */
.mobile-menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--card-bg);
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-main);
    backdrop-filter: blur(8px);
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    display: none;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: block !important;
    }
}

/* 語言切換按鈕 */
.lang-switch {
    margin-bottom: 30px;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--text-sub);
    color: var(--text-sub);
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    margin: 0 5px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-btn:hover, .lang-btn.active {
    background: var(--text-main);
    color: var(--bg-gradient); /* 反白效果 */
    border-color: var(--text-main);
}

/* 個人檔案 */
.profile {
    margin-bottom: 40px;
    text-align: center;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

#profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

#profile-bio {
    color: var(--text-sub);
    font-size: 1rem;
    line-height: 1.5;
}

/* 連結列表 */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 連結網格佈局 */
.links-grid {
    display: grid;
    grid-template-columns: repeat(4, 76px);
    grid-auto-rows: 76px;
    gap: 12px;
    justify-content: start;
    align-content: center;
    max-width: 320px;
}



/* 分類區塊樣式 */
.category-section {
    margin-bottom: 0;
    padding: 60px 20px;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50% - 20px);
    box-sizing: border-box;
    left: 0;
    right: 0;
}

/* 區塊的背景色交替設定 */
.category-section:nth-child(4), /* 社群媒體 */
.category-section:nth-child(6) { /* 電子書販售 */
    background: #ffffff !important; /* 白色底色 - 強制優先級 */
}

.category-section:nth-child(5), /* 付費訂閱 */
.category-section:nth-child(7) { /* 實體商品通販 */
    background: #f5f7fa !important; /* 跟KABON一樣的底色 - 強制優先級 */
}

/* 左右分欄容器 */
.category-content {
    display: flex;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
    gap: 40px;
    min-height: 200px;
}

.category-text {
    flex: 0 0 250px;
    text-align: center;
}

.category-links {
    flex: 1;
    position: relative;
}



.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    color: var(--text-main);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    margin: 16px auto 0;
    border-radius: 3px;
}

/* 為不同分類設定不同的裝飾線顏色 */
#social-media-title::after {
    background: #3498db;
}

#subscription-title::after {
    background: #e74c3c;
}

#digital-sales-title::after {
    background: #f39c12;
}

#physical-goods-title::after {
    background: #27ae60;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    padding: 8px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-main);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: visible;
    width: 76px;
    height: 76px;
    margin: 0;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* 連結內的圖片 */
.link-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: block;
    opacity: 1;
    visibility: visible;
}

.link-card:hover .link-thumb {
    transform: scale(1.05);
}

/* Tooltip 樣式 */
.link-info {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.8);
}

.link-card:hover .link-info {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.link-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2px;
    display: block;
    color: var(--text-main);
    line-height: 1.2;
}

.link-desc {
    font-size: 0.7rem;
    color: var(--text-sub);
    line-height: 1.2;
    max-width: 200px;
}

.footer {
    margin-top: 50px;
    font-size: 0.8rem;
    color: var(--text-sub);
    opacity: 0.7;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .category-content {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
        min-height: 160px;
    }
    
    .right-text .category-content {
        flex-direction: column;
    }
    
    .category-text {
        flex: none;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .links-grid {
        grid-template-columns: repeat(4, 65px);
        grid-auto-rows: 65px;
        gap: 10px;
        max-width: 280px;
    }
    
    .category-section {
        padding: 40px 0;
    }
    
    .link-card {
        width: 65px;
        height: 65px;
    }
    
    .link-thumb {
        width: 50px;
        height: 50px;
    }
    
    .container {
        padding: 10px;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    #profile-name {
        font-size: 1.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .commission-content {
        padding: 20px 15px;
    }
}

/* 委託頁面樣式 */
.commission-section {
    margin: 30px 0;
    text-align: left;
}

.commission-status-panel {
    margin: 0 0 30px 0;
    padding: 20px;
    background: rgba(52, 152, 219, 0.08);
    border: 1px solid rgba(52, 152, 219, 0.15);
    border-radius: var(--radius-lg);
}

.commission-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.commission-status-card {
    background: rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
}

.commission-status-label {
    display: block;
    color: var(--text-sub);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.commission-status-value {
    display: block;
    color: var(--text-main);
    font-size: 2rem;
    line-height: 1;
}

.commission-status-note {
    margin-top: 14px;
    color: var(--text-sub);
    font-size: 0.95rem;
    text-align: center;
}

/* 委託開放倒數計時器 */
.commission-countdown {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: var(--radius-lg);
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    z-index: 100;
    min-width: 280px;
    animation: fadeInScale 0.5s ease-out;
}

.commission-countdown .countdown-header {
    text-align: center;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.15);
}

.commission-countdown .countdown-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.commission-countdown .countdown-segment {
    background: rgba(52, 152, 219, 0.08);
    border-radius: var(--radius-sm);
    padding: 10px 5px;
    text-align: center;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.commission-countdown .countdown-number {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    color: #3498db;
    line-height: 1;
    margin-bottom: 4px;
}

.commission-countdown .countdown-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 倒數計時器動畫 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.commission-countdown .countdown-number.pulse {
    animation: pulse 1s ease-in-out infinite;
}

/* 深色模式下的倒數計時器 */
@media (prefers-color-scheme: dark) {
    .commission-countdown {
        background: rgba(40, 40, 40, 0.95);
        border-color: rgba(52, 152, 219, 0.3);
    }
    
    .commission-countdown .countdown-segment {
        background: rgba(52, 152, 219, 0.15);
    }
}

/* 移動端倒數計時器 */
@media (max-width: 768px) {
    .commission-countdown {
        position: static;
        top: auto;
        right: auto;
        margin: 0 0 20px 0;
        min-width: auto;
        width: 100%;
    }
    
    .commission-countdown .countdown-display {
        gap: 6px;
    }
    
    .commission-countdown .countdown-segment {
        padding: 8px 3px;
        min-height: 50px;
    }
    
    .commission-countdown .countdown-number {
        font-size: 1.2rem;
    }
    
    .commission-countdown .countdown-label {
        font-size: 0.65rem;
    }
}

.commission-section h2 {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

.commission-section p,
.commission-section ol {
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 10px;
}

.commission-section ol {
    padding-left: 20px;
}

.commission-section li {
    margin-bottom: 8px;
}

.commission-button-section {
    margin: 40px 0;
    text-align: center;
}

.commission-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.commission-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.commission-btn:hover::before {
    left: 100%;
}

.commission-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.commission-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .commission-status-grid {
        grid-template-columns: 1fr;
    }

    .commission-status-value {
        font-size: 1.7rem;
    }
}

/* 彈出視窗基本樣式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    padding: 20px 30px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    color: var(--text-main);
    font-size: 1.4rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-sub);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}

.modal-body {
    padding: 20px 30px 30px;
}

/* 表單樣式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-group small {
    display: block;
    color: var(--text-sub);
    font-size: 0.8rem;
    margin-top: 5px;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-cancel,
.btn-submit {
    padding: 10px 25px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-cancel {
    background: rgba(108,117,125,0.1);
    color: var(--text-sub);
    border: 1px solid rgba(108,117,125,0.3);
}

.btn-cancel:hover {
    background: rgba(108,117,125,0.2);
    color: var(--text-main);
}

.btn-submit {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 2px 10px rgba(40,167,69,0.3);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40,167,69,0.4);
}

.btn-submit:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 載入中樣式 */
.loading-content {
    text-align: center;
    padding: 40px 30px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(52,152,219,0.3);
    border-left: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-content p {
    color: var(--text-main);
    margin: 0;
    font-size: 1rem;
}

/* 動畫效果 */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 響應式彈出視窗 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body {
        padding: 15px 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-submit {
        width: 100%;
        padding: 12px;
    }
}

/* 倒數計時器樣式 */
.reservation-countdown {
    background: linear-gradient(135deg, #f7b731, #f39c12);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
    animation: pulse 2s infinite;
}

.reservation-countdown.warning {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    animation: urgentPulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes urgentPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(231, 76, 60, 0.6);
    }
}

/* === 畫廊懶加載樣式 === */

/* 加載指示器 */
.gallery-loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    max-width: 400px;
    animation: fadeInUp 0.3s ease-out;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gallery-loading p {
    margin: 0;
    font-size: 0.9rem;
    color: #fff;
    opacity: 0.9;
    font-weight: 400;
}

/* 加載完成指示器 */
.gallery-end {
    display: none;
    text-align: center;
    padding: 30px 20px;
    margin: 30px auto;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    max-width: 400px;
    animation: fadeInUp 0.5s ease-out;
}

.gallery-end p {
    margin: 0;
    font-size: 0.9rem;
    color: #fff;
    opacity: 0.8;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .gallery-loading,
    .gallery-end {
        max-width: 90%;
        padding: 25px 15px;
        margin: 15px auto;
    }
    
    .loading-spinner {
        width: 35px;
        height: 35px;
    }
    
    .gallery-loading p,
    .gallery-end p {
        font-size: 0.85rem;
    }
}

/* 深色模式調整 */
@media (prefers-color-scheme: dark) {
    .gallery-loading {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .gallery-end {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* 連結內的圖片 */
.link-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: block;
    opacity: 1;
    visibility: visible;
}

.link-card:hover .link-thumb {
    transform: scale(1.05);
}

/* Tooltip 樣式 */
.link-info {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.8);
}

.link-card:hover .link-info {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.link-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2px;
    display: block;
    color: var(--text-main);
    line-height: 1.2;
}

.link-desc {
    font-size: 0.7rem;
    color: var(--text-sub);
    line-height: 1.2;
    max-width: 200px;
}

.footer {
    margin-top: 50px;
    font-size: 0.8rem;
    color: var(--text-sub);
    opacity: 0.7;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .category-content {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
        min-height: 160px;
    }
    
    .right-text .category-content {
        flex-direction: column;
    }
    
    .category-text {
        flex: none;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .links-grid {
        grid-template-columns: repeat(4, 65px);
        grid-auto-rows: 65px;
        gap: 10px;
        max-width: 280px;
    }
    
    .category-section {
        padding: 40px 0;
    }
    
    .link-card {
        width: 65px;
        height: 65px;
        padding: 5px;
    }
    
    .link-thumb {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .links-grid {
        grid-template-columns: repeat(3, 70px);
        grid-auto-rows: 70px;
        gap: 8px;
        max-width: 230px;
    }
    
    .category-content {
        min-height: 140px;
    }
    
    .link-card {
        width: 70px;
        height: 70px;
        padding: 5px;
    }
    
    .link-thumb {
        width: 55px;
        height: 55px;
    }
    
    .link-title {
        font-size: 0.75rem;
    }
    
    .link-desc {
        font-size: 0.65rem;
    }
}