/* 
 * 遊戲平台樣式 - 參考 Novice.tw 設計風格
 * 版本: 2.0.0
 */

/* ===== CSS 變數定義 ===== */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white-color: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-sm: 0.875rem;
    --line-height-base: 1.5;
    
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-sm: 0.25rem;
    
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    
    --transition: all 0.15s ease-in-out;
}

/* ===== 基本樣式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--gray-700);
    background-color: var(--gray-100);
    min-height: 100vh;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ===== 排版樣式 ===== */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* ===== 連結樣式 ===== */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* ===== 按鈕樣式 ===== */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
    color: var(--white-color);
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white-color);
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--gray-900);
}

.btn-info {
    background-color: var(--info-color);
    color: var(--white-color);
}

.btn.secondary {
    background-color: #95a5a6;
}

.btn.secondary:hover {
    background-color: #7f8c8d;
}

.btn.primary {
    background-color: #e74c3c;
}

.btn.primary:hover {
    background-color: #c0392b;
}


/* ===== 導航欄樣式 - 嚴格參考 Novice.tw ===== */
.navbar {
    background-color: #fff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 0 1rem !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
}

/* 品牌標誌樣式 */
.navbar-brand {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    margin-right: 2rem;
    text-decoration: none;
}

.navbar-brand:hover {
    color: #007bff;
    text-decoration: none;
}

/* 品牌圖標樣式 */
.navbar-brand i {
    font-size: 1.3em;
    margin-right: 0.5rem;
    color: #007bff;
}

/* 導航鏈接樣式 */
.nav-link {
    color: #555 !important;
    transition: color 0.2s ease;
    padding: 0.5rem 0.75rem !important;
    line-height: 1;
    font-size: 0.9rem;
    text-decoration: none;
}

.nav-link:hover {
    color: #007bff !important;
    text-decoration: none;
}

.nav-link.active {
    color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.1);
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    line-height: 1;
    border: 1px solid #dee2e6;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* 右側用戶選項樣式 */
.navbar-nav .nav-item {
    margin-left: 0.5rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem;
}

/* 手機版導航欄修正 */
@media (max-width: 767px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        height: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
        padding: 0 1rem !important;
        display: flex !important;
        align-items: center !important;
        line-height: 1 !important;
    }

    .navbar .container { 
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 100%;
    }

    .navbar-brand {
        padding: 0; 
        margin-right: 10px;
        line-height: 1;
    }

    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        margin-left: auto;
        line-height: 1;
    }

    body {
        padding-top: 50px;
        padding-bottom: 60px; 
    }

    .navbar-collapse {
        background-color: #fff;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 1029;
        padding: 1rem;
        border-bottom: 1px solid rgba(0,0,0,.1);
        box-shadow: 0 4px 4px rgba(0,0,0,.1);
    }
    .navbar-collapse .navbar-nav {
        flex-direction: column;
        width: 100%; 
    }
    .navbar-collapse .nav-item {
        margin-bottom: 0px; 
    }
    .navbar-collapse .nav-item .nav-link {
        padding-top: 0.5rem; 
        padding-bottom: 0.5rem;
        width: 100%; 
        display: block;
    }
}

@media (max-width: 991px) {
    .navbar-collapse .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    .navbar-collapse .nav-item .nav-link {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        width: 100%;
    }
}

/* ===== 二欄式佈局樣式 - 參考 Novice.tw ===== */
.main-content-section {
    min-height: 100vh;
}

.section-title {
    color: var(--gray-800);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.content-section .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-section .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* 統計框樣式 */
.stat-box {
    background-color: var(--white-color);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition);
    text-align: center;
    padding: 1.5rem;
}

.stat-box:hover {
    background-color: var(--gray-100);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.stat-box i {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.stat-box .text-warning {
    color: var(--warning-color) !important;
}

.stat-number {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* ===== 精簡版平台狀態 ===== */
.platform-status-compact {
    background: var(--white-color);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: var(--box-shadow-sm);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
}

.status-item i {
    font-size: 1rem;
}

/* 收合按鈕樣式 */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: var(--white-color);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 收合動畫 */
.collapse {
    transition: height 0.35s ease;
}

.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

/* 收合按鈕圖標旋轉 */
[data-toggle="collapse"] i {
    transition: transform 0.3s ease;
}

[data-toggle="collapse"][aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* 分類分隔線 */
.border-top {
    border-top: 1px solid var(--gray-300) !important;
}

/* 分類按鈕間距優化 */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
}

.category-tabs .btn {
    margin-bottom: 0.5rem;
}

/* ===== 緊湊版分類樣式 ===== */
.category-compact {
    background: var(--white-color);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 1rem;
    box-shadow: var(--box-shadow-sm);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.category-tabs-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--gray-100);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--gray-300);
    transition: var(--transition);
}

.category-tag:hover {
    background: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-1px);
}

.category-tag-primary {
    background: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.category-tag-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: var(--white-color);
}

/* 同步狀態 */
.sync-status {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.status-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.status-item h3 {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.status-success {
    color: #27ae60;
}

.status-partial {
    color: #f39c12;
}

.status-error {
    color: #e74c3c;
}

/* ===== 遊戲網格 ===== */
.game-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem;
    margin: 2rem 0;
}

.game-grid.small {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.game-grid.category-page {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

/* ===== 卡片樣式 ===== */
.game-card {
    background-color: var(--white-color);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

/* ===== 可點擊遊戲卡片 ===== */
.game-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    width: 100%;
    height: 100%;
}

.game-card-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.game-card-link:hover .game-info h3 {
    color: var(--primary-color);
}

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

.game-card-link .game-image img {
    transition: transform 0.3s ease;
}

.game-card.small {
    border-radius: 8px;
}

.game-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.game-card.small .game-image {
    height: 120px;
}

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

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

.quality-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.quality-badge.large {
    font-size: 1rem;
    padding: 8px 12px;
}

.game-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-card.small .game-info {
    padding: 1rem;
}

.game-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    font-weight: 600;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.game-card.small .game-info h3 {
    font-size: 1rem;
}

.game-info .category {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: inline-block;
    background: rgba(0, 123, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-info .description {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    hyphens: auto;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

/* 分類列表 */
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 20px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.category-item .count {
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* ===== 分類標籤 ===== */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.category-tabs a {
    padding: 0.5rem 1rem;
    background: var(--white-color);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none;
    color: var(--gray-700);
}

.category-tabs a:hover,
.category-tabs a.active {
    background: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    text-decoration: none;
}

/* 遊戲詳情頁 */
.game-detail {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* 遊戲說明 */
.game-instructions {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.instruction-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.instruction-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.instruction-item p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.instruction-item ul {
    color: #666;
    line-height: 1.6;
    padding-left: 1.5rem;
}

.instruction-item li {
    margin-bottom: 0.5rem;
}

/* 官方遊戲說明 */
.official-instructions {
    background: #e8f5e8;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
    margin-bottom: 2rem;
}

.official-instructions h3 {
    color: #27ae60;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.instructions-text {
    color: #2c3e50;
    line-height: 1.6;
    font-size: 1rem;
}

.game-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.game-cover {
    position: relative;
}

.game-cover img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.game-tags {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.category-tag, .size-tag {
    padding: 6px 12px;
    background: #ecf0f1;
    border-radius: 20px;
    font-size: 0.9rem;
}

.game-dates p {
    margin-bottom: 0.5rem;
    color: #666;
}

.game-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* 遊戲嵌入區域 */
.game-embed {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.embed-container {
    text-align: center;
    margin: 1rem 0;
}

.embed-container iframe {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.embed-note {
    color: #666;
    font-style: italic;
    margin-top: 1rem;
}

/* 相關遊戲 */
.related-games {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 分頁 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-item {
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.pagination-item:hover,
.pagination-item.active {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* 麵包屑 */
.breadcrumb {
    margin-bottom: 2rem;
    color: #666;
}

.breadcrumb a {
    color: #3498db;
}

.breadcrumb span {
    color: #2c3e50;
    font-weight: 500;
}

/* 統計區域 */
.stats {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 0.5rem;
}

/* 快速預覽 */
.quick-preview {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.preview-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.preview-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.preview-item p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.preview-status {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 同步頁面 */
.sync-actions {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.action-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.action-buttons button,
.action-buttons a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    min-width: 150px;
    text-align: center;
    text-decoration: none;
}

.action-buttons button small,
.action-buttons a small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: normal;
}

.sync-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    color: #856404;
}

.sync-progress {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.3s ease;
}

.sync-log {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: 6px;
    height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.log-item {
    margin-bottom: 0.5rem;
    padding: 2px 0;
}

.log-success {
    color: #2ecc71;
}

.log-error {
    color: #e74c3c;
}

.log-info {
    color: #3498db;
}

.sync-history {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.history-details {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.status-success {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-partial {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-error {
    background: #f8d7da;
    color: #721c24;
}

.sync-help {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.help-content h3 {
    color: #3498db;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.help-content h3:first-child {
    margin-top: 0;
}

.help-content p {
    color: #666;
    margin-bottom: 1rem;
}

/* 錯誤頁面 */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.error-page h1 {
    font-size: 6rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-page h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.error-page p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 無遊戲提示 */
.no-games {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.no-games h3 {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.no-games p {
    color: #666;
    margin-bottom: 1rem;
}

/* ===== 頁腳樣式 ===== */
footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

footer p {
    text-align: center;
    color: var(--gray-400);
    font-size: 1rem;
    line-height: 1.6;
}

footer a {
    color: var(--primary-color);
    transition: var(--transition);
}

footer a:hover {
    color: var(--white-color);
    text-decoration: none;
}

/* 新增樣式 - 參考 Novice.tw 風格 */
.category-filter {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-filter h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.8rem;
}

.game-count {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.breadcrumb a {
    color: #667eea;
    font-weight: 500;
}

.breadcrumb span {
    color: #2c3e50;
    font-weight: 600;
}

/* 載入動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeInUp 0.6s ease-out;
}

/* 滾動條樣式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* ===== 工具類 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.shadow { box-shadow: var(--box-shadow); }
.shadow-sm { box-shadow: var(--box-shadow-sm); }
.shadow-lg { box-shadow: var(--box-shadow-lg); }

.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-sm { border-radius: var(--border-radius-sm); }

/* ===== 動畫效果 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

/* ===== 自定義滾動條 ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-200);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ===== 分頁樣式 ===== */
.pagination {
    margin: 0;
}

.page-link {
    color: var(--primary-color);
    background-color: var(--white-color);
    border: 1px solid var(--gray-300);
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
}

.page-link:hover {
    color: var(--white-color);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    text-decoration: none;
}

.page-item.active .page-link {
    color: var(--white-color);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: var(--gray-500);
    background-color: var(--white-color);
    border-color: var(--gray-300);
    cursor: not-allowed;
}

/* ===== 響應式設計 ===== */
@media (max-width: 1200px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.25rem;
    }
    
    .game-grid.category-page {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.25rem;
    }
}

@media (max-width: 991px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem;
    }
    
    .game-grid.category-page {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem;
    }
}

@media (max-width: 767px) {
    .game-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .game-grid.category-page {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
}

@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .game-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .game-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .category-tabs {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    /* 精簡版狀態響應式 */
    .platform-status-compact {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .status-item {
        justify-content: center;
    }
    
    /* 緊湊版分類響應式 */
    .category-compact {
        padding: 0.5rem 0.75rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .category-tabs-compact {
        gap: 0.3rem;
    }
    
    .category-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    .history-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .history-details {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .game-grid.small {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .category-list {
        flex-direction: column;
    }
    
    .category-item {
        justify-content: center;
    }
}

/* 遊戲詳情頁面新增樣式 */
.border-left-primary {
    border-left: 4px solid #007bff !important;
}

.border-left-success {
    border-left: 4px solid #28a745 !important;
}

.border-left-warning {
    border-left: 4px solid #ffc107 !important;
}

.border-left-info {
    border-left: 4px solid #17a2b8 !important;
}

.game-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    transition: all 0.3s ease;
}

.embed-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.embed-container iframe {
    max-width: 100%;
    height: auto;
}

@media (max-width: 767px) {
    .embed-container iframe {
        width: 100% !important;
        height: 300px !important;
    }
}

/* 遊戲操作區域樣式 */
.game-play-area .card {
    border-radius: 8px;
}

.game-frame-container {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
}

.game-iframe {
    display: block;
    width: 100%;
    height: 500px;
    border: none;
    background: #000;
}

.game-info-bar {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.game-controls .btn {
    margin-left: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border-radius: 6px;
}

.game-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.game-controls .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.game-controls .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

.game-controls .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
}

.game-controls .btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: none;
}

.game-controls .btn-success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
}

/* 全螢幕模式樣式 */
.game-iframe.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #000 !important;
}

.game-info-bar.fullscreen {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10000 !important;
    background: rgba(248, 249, 250, 0.95) !important;
    backdrop-filter: blur(10px) !important;
}

/* 全螢幕退出按鈕 */
.fullscreen-exit-btn {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10001 !important;
}

.fullscreen-exit-btn .btn {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    border: none !important;
    font-weight: 600 !important;
}

.fullscreen-exit-btn .btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4) !important;
    transition: all 0.2s ease !important;
}

/* 響應式遊戲框架 */
@media (max-width: 768px) {
    .game-iframe {
        height: 400px;
    }
    
    .game-controls {
        margin-top: 0.5rem;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .game-controls .btn {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 0.5rem;
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 576px) {
    .game-iframe {
        height: 300px;
    }
    
    .game-controls .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .game-controls .btn i {
        font-size: 0.75rem;
    }
}

/* 收折按鈕動畫效果 */
[data-toggle="collapse"] i {
    transition: transform 0.3s ease;
}

[data-toggle="collapse"][aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* 分類標籤樣式 */
.category-tag-primary {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

.category-tag-primary:hover {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
    color: white !important;
}

/* 超緊湊分類樣式 */
.category-ultra-compact {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.category-header-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-title-mini {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.category-tags-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.category-tag-mini {
    display: inline-block;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.3;
}

.category-tag-mini:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    text-decoration: none;
    transform: translateY(-1px);
}

.category-tag-mini.category-tag-primary {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

.category-tag-mini.category-tag-primary:hover {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
    color: white !important;
}

.btn-xs {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.3;
    border-radius: 3px;
}

/* ===== 簡化版遊戲分類樣式 ===== */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    text-decoration: none;
    color: #495057;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 0.4rem;
}

.category-tag:hover {
    background: #007bff;
    border-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.category-tag .badge {
    background: #e9ecef;
    color: #6c757d;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.category-tag:hover .badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ===== 遊戲記錄頁面樣式 ===== */
.game-grid.history-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.action-badge i {
    font-size: 0.7rem;
}

.game-meta .action-type {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.game-meta .date {
    font-size: 0.75rem;
    color: #adb5bd;
}

/* 統計卡片樣式 */
.card.bg-primary,
.card.bg-success,
.card.bg-warning {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card.bg-primary .opacity-75,
.card.bg-success .opacity-75,
.card.bg-warning .opacity-75 {
    opacity: 0.75;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .category-tags {
        gap: 0.4rem;
    }
    
    .category-tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .category-tag .badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
    
    .game-grid.history-page {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card.bg-primary,
    .card.bg-success,
    .card.bg-warning {
        margin-bottom: 1rem;
    }
}
