﻿/* 頁面組件樣式 */
/* 頭部固定樣式 */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--secondary-color) !important;
}

header.header,
header.site-header,
.header,
.site-header,
body .header,
body .site-header,
html .header,
html .site-header {
    width: 100%;
    background-color: var(--secondary-color) !important;
    z-index: 1000;
    transition: all var(--transition-normal);
}

header.header.fixed,
header.site-header.fixed,
.header.fixed,
.site-header.fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease;
}

/* 移動端底部按钮 */
.mobile-footer-buttons {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 1000;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .mobile-footer-buttons {
        display: flex;
    }
}

.mobile-footer-buttons .auth-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48%;
    height: 44px;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.mobile-footer-buttons .register-button {
    background-color: var(--accent-color);
    color: #fff;
}

.mobile-footer-buttons .login-button {
    background-color: #ffc107;
    color: #000;
}

/* 為固定頭部添加動畫效果 */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* 當頭部固定時，為內容添加上邊距，防止內容被遮擋 */
body.header-fixed {
    padding-top: 120px; /* 根據您的頭部高度調整 */
}

/* 響應式調整 */
@media (max-width: 768px) {
    .mobile-auth-buttons {
        display: flex;
        justify-content: center;
        gap: 20px;
    }
    
    .auth-buttons {
        display: none; /* 在移動端隱藏頭部原有的註冊登錄按鈕 */
    }
    
    body {
        padding-bottom: 70px; /* 為底部固定按鈕添加間距 */
    }
    
    .mobile-auth-buttons .auth-button {
        flex: 1;
        max-width: 160px;
    }
    
    .mobile-auth-buttons .auth-button:active {
        transform: scale(0.95);
    }
}

/* 當移動端按鈕固定時，為內容添加下邊距，防止內容被遮擋 */
body.mobile-buttons-fixed {
    padding-bottom: 60px; /* 根據您的按鈕高度調整 */
}

/* 麵包屑導航 */
.breadcrumb {
    margin: 20px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: var(--text-tertiary);
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.breadcrumb-link:hover {
    color: var(--info-color);
}

.breadcrumb-current {
    color: var(--info-color);
}

/* 按鈕樣式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: all var(--transition-normal);
    font-size: 16px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--success-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--success-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 卡片樣式 */
.card {
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

/* 提示框樣式 */
.alert {
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-info {
    background-color: #e7f4fd;
    color: var(--info-color);
    border-left: 4px solid #3498db;
}

.alert-success {
    background-color: #e8f8f5;
    color: var(--success-color);
    border-left: 4px solid #2ecc71;
}

.alert-warning {
    background-color: #fef7e9;
    color: var(--warning-color);
    border-left: 4px solid #f1c40f;
}

.alert-danger {
    background-color: #fdedeb;
    color: var(--danger-color);
    border-left: 4px solid #e74c3c;
}

/* 表單元素 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.form-input:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 5px rgba(44, 107, 196, 0.2);
}

.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-size: 14px;
    min-height: 150px;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 5px rgba(44, 107, 196, 0.2);
}

/* 头部搜索栏 */
.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    padding: 5px 15px;
    transition: all var(--transition-normal);
}

.search-bar:focus-within {
    background-color: var(--bg-light);
    box-shadow: var(--shadow-sm);
}

.search-input {
    border: none;
    background: transparent;
    padding: 8px 10px;
    width: 100%;
    font-size: 14px;
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
}

.search-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--transition-normal);
}

.search-btn:hover {
    color: var(--info-color);
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination-list {
    display: flex;
    list-style: none;
}

.pagination-item {
    margin: 0 5px;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: var(--bg-light);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.pagination-link:hover {
    background-color: var(--info-color);
    color: var(--text-light);
}

.pagination-current {
    background-color: var(--info-color);
    color: var(--text-light);
}

/* 標籤 */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.badge-primary {
    background-color: var(--danger-color);
    color: var(--text-light);
}

.badge-secondary {
    background-color: var(--warning-color);
    color: var(--text-primary);
}

.badge-dark {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Brand Story文章列表优化 */
.footer-card .support-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-card .support-link {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition-normal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.footer-card .support-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.footer-card .link-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 20px; /* 为图标留出空间 */
}

.footer-card .support-link::after {
    content: "→";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all var(--transition-normal);
}

.footer-card .support-link:hover::after {
    opacity: 1;
    right: 15px;
}

/* 导航组件 */
.nav-component {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
}

/* 全局标题组件 */
.section-header {
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color) !important;
}

/* 顶部导航栏组件 */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    background-color: var(--primary-color) !important;
    background: var(--primary-color) !important;
}

.top-nav-left {
    display: flex;
    align-items: center;
}

.top-nav-right {
    display: flex;
    align-items: center;
}

/* 用户按钮组件 */
.user-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-button i {
    margin-right: 5px;
}

.login-button {
    color: var(--text-light);
    background: var(--bg-gradient-success);
    border: none;
}

.register-button {
    color: var(--text-light);
    background: var(--bg-gradient-accent);
    border: none;
}

/* 搜索框组件 */
.search-box {
    position: relative;
    width: 250px;
}

.search-box input {
    width: 100%;
    padding: 8px 30px 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 104, 141, 0.2);
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.search-box button:hover {
    color: var(--primary-color);
}

/* 广告横幅组件 */
.ad-banner {
    width: 100%;
    margin: 20px 0;
    text-align: center;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* 按钮组件 */
.button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button.primary {
    background-color: var(--success-color);
    color: var(--text-light);
}

.button.primary:hover {
    background-color: var(--success-dark);
}

.button.secondary {
    background-color: var(--accent-color);
    color: var(--text-light);
}

.button.secondary:hover {
    background-color: var(--accent-dark);
}

/* 卡片组件 */
.card {
    background-color: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 提醒组件 */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    position: relative;
}

.alert.info {
    background-color: #e7f4fd;
    color: var(--info-color);
    border-left: 4px solid #3498db;
}

.alert.success {
    background-color: #e8f8f5;
    color: var(--success-color);
    border-left: 4px solid #2ecc71;
}

.alert.warning {
    background-color: #fef7e9;
    color: var(--warning-color);
    border-left: 4px solid #f1c40f;
}

.alert.danger {
    background-color: #fdedeb;
    color: var(--danger-color);
    border-left: 4px solid #e74c3c;
}

/* 表单组件 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    display: block;
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-light);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--info-color);
}

.form-select {
    display: block;
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-light);
    color: var(--text-primary);
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%23666" d="M4 6h8l-4 4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.form-textarea {
    display: block;
    width: 100%;
    min-height: 100px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-light);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--info-color);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: var(--text-tertiary);
}

/* 分页组件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 4px;
    background-color: var(--bg-light);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-item.active {
    background-color: var(--info-color);
    color: var(--text-light);
}

.pagination-item:hover {
    background-color: var(--info-color);
    color: var(--text-light);
}

/* 徽章组件 */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 15px;
    margin-right: 5px;
}

.badge.danger {
    background-color: var(--danger-color);
    color: var(--text-light);
}

.badge.warning {
    background-color: var(--warning-color);
    color: var(--text-primary);
}

.badge.secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* 图片列表组件 */
.image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.image-item {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-light);
    font-size: 14px;
}

