/* GamePixel Frontend - Component Styles */

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #7f8c8d;
}

.breadcrumb a {
    color: #7f8c8d;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #3498db;
}

.breadcrumb-separator {
    color: #bdc3c7;
}

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

/* Pagination */
.pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-info {
    color: #7f8c8d;
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
    color: #3498db;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background: #f8f9fa;
    border-color: #3498db;
    color: #3498db;
}

.pagination-number.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: #7f8c8d;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Tags */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    font-size: 0.75rem;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #e9ecef;
    border-color: #3498db;
    color: #3498db;
}

.tag-more {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #6c757d;
    color: white;
    border-radius: 15px;
    font-size: 0.75rem;
}

/* Game Detail Styles */
.game-detail-container {

}

.game-bottom-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; display: flex; align-items: center; justify-content: space-between; background: rgba(13,17,23,0.9); color: #fff; padding: 0 12px; z-index: 4; border-radius: 0; gap: 8px; }
.game-bottom-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.bar-right { display: flex; align-items: center; gap: 12px; }
.bar-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: #fff; }
.bar-brand .site-logo { width: 20px; height: 20px; border-radius: 4px; }
.bar-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: none; border-radius: 8px; background: rgba(255,255,255,0.1); color: #fff; cursor: pointer; transition: background 0.2s ease; }
.bar-icon-btn:hover { background: rgba(255,255,255,0.2); }
.bar-icon-btn i { font-size: 14px; }
@media (max-width: 590px) { .game-bottom-bar { height: 44px; padding: 0 10px; } .bar-icon-btn { width: 30px; height: 30px; } .game-bottom-title { font-size: 13px; } }

.game-detail-header {
    margin-bottom: 2rem;
}

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

.game-detail-main {
    background: var(--bg-dark);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.game-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-detail-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 面包屑导航优化 */
.breadcrumb {
    background: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 0;
    margin-bottom: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-gray) !important;
    content: "›" !important;
    font-weight: bold;
}

.breadcrumb-item a {
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
}

.breadcrumb-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Game Frame Container Optimization */
.game-frame-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    /* margin-bottom: 2rem; */
    /* padding: 0 1rem; media */

    height: auto;
    /* max-height: calc(100vh - 60px - 45px - 64px); */
    width: 100%;
}

.game-frame-aspect-ratio-container {
    /* max-height: 100%; */
    aspect-ratio: 16 / 9;
    margin: auto;
    display: flex;
    flex-direction: column;
    max-width: 1136px;
    max-height: 680px;
}

.game-frame {
    position: relative;
    width: 100%;
    height: 100%;

    padding-bottom: 44px; /* Reserve space for bottom bar */

}

.game-frame iframe {
    position: absolute;
    width: 100%;
    height: calc(100% - 44px); /* Subtract the height of the bottom bar */
    border: 0px;
    margin: 0px;
    padding: 0px;
    top: 0px;
    left: 0px;
    user-select: none;

    /* inset: 0px 0px 90px; */
    /* margin: auto !important; */
    z-index: 0;
    background: transparent !important;
}

.game-preview {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 0px;
    margin: 0px;
    padding: 0px;
    top: 0px;
    left: 0px;
    user-select: none;
    z-index: 1;
    overflow: hidden;
}

.game-thumbnail-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-thumbnail {
    width: 110%;
    height: 110%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 0.5rem;
    filter: blur(6px);
}

.game-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 2.25rem;
}

.game-play-overlay:hover {
    background: rgba(0, 0, 0, 0.6);
}

.game-play-overlay:hover .game-thumbnail {
    transform: scale(1.05);
}

.game-thumbnail-top {
    height: 150px;
    border-radius: 6px;
}

.play-now-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 30px;
    padding: 10px 30px 10px 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    min-width: 180px;
}

.play-now-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.play-now-button:active {
    transform: translateY(-1px) scale(1.02);
}

.play-now-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.play-icon {
    width: 45px;
    height: 45px;
    /* background: rgba(255, 255, 255, 0.2); */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-icon i {
    font-size: 20px;
    margin-left: 3px; /* 调整播放图标位置 */
}

.play-now-button:hover .play-icon {
    /* background: rgba(255, 255, 255, 0.3); */
    transform: scale(1.1);
}

.play-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 游戏iframe容器样式 */
.game-iframe-container {
    position: absolute;
    width: 100%;
    height: 100%;
    
    /* border-radius: 12px; */
    overflow: hidden;
    background-color: #000;
}

.game-frame.page-fullscreen { position: fixed; width: 100%; height: 100%; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; }

/* Game loading animation styles */
.game-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    inset: 0;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    font-size: 48px;
    margin-bottom: 20px;
    color: #6366f1;
}

.loading-spinner i {
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-size: 18px;
    font-weight: 500;
    color: #ccc;
}

.loading-error {
    text-align: center;
    color: #ff6b6b;
}

.loading-error i {
    font-size: 48px;
    margin-bottom: 15px;
}

.loading-error div {
    font-size: 16px;
    margin-bottom: 10px;
}

/* 游戏信息卡片优化 */
.game-info-card {
    background: var(--bg-dark);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.game-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.game-info-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-white);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
}

/* 游戏标题区域优化 */
.game-detail-info-section .bg-gray-dark {
    background: var(--bg-dark) !important;
    border-radius: 16px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 徽章和标签优化 */
.badge {
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease;
    flex-direction: row !important;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a90e2 100%) !important;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.badge.bg-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%) !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4) !important;
}

/* 标签内容样式优化 */
.badge .tag-name {
    font-weight: 400;
}

.badge .tag-count {
    font-size: 0.8125rem;
    font-weight: 400;
}

/* 按钮优化 */
.btn {
    border-radius: 10px !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.game-image-section {
    text-align: center;
    margin-bottom: 2rem;
}

.game-image-section img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.game-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.game-meta-item i {
    color: var(--primary-color);
}

.game-stats {
    display: flex;
    gap: 1rem;
}

.game-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.game-description h3,
.game-instructions h3,
.game-specs h3,
.game-details h3 {
    margin-bottom: 1rem;
    color: var(--text-white);
}

.game-specs-list {
    list-style: none;
}

.game-specs-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.game-specs-list li:hover {
    background: rgba(255, 255, 255, 0.02);
    padding-left: 0.5rem;
    border-radius: 6px;
}

.game-specs-list li:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 500;
    color: var(--text-white);
}

.spec-value {
    color: var(--text-gray);
}

.instructions-content {
    line-height: 1.7;
    color: var(--text-gray);
}

.instructions-content p {
    margin-bottom: 1rem;
}

.instructions-content ul,
.instructions-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.instructions-content li {
    margin-bottom: 0.5rem;
}

.game-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.game-description h3,
.game-instructions h3,
.game-specs h3,
.game-details h3 {
    margin-bottom: 1rem;
    color: var(--text-white);
}

.game-specs-list {
    list-style: none;
}

.game-specs-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.game-specs-list li:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 500;
    color: var(--text-white);
}

.spec-value {
    color: var(--text-gray);
}

.instructions-content {
    line-height: 1.6;
}

.instructions-content p {
    margin-bottom: 1rem;
}

.instructions-content ul,
.instructions-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.instructions-content li {
    margin-bottom: 0.5rem;
}

/* Game Play Styles */
.game-play-container {
    padding: 2rem 0;
}

.game-play-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-play-info {
    flex: 1;
}

.game-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.game-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.game-frame iframe {
    /*max-width: 100%;
    border: none;
    height: auto;
    aspect-ratio: 9/16; */ /* 适应1080x1920的比例 */
}



.game-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: white;
    text-align: center;
}

.game-error-icon {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.game-error h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.game-error p {
    color: #bdc3c7;
    margin-bottom: 2rem;
}

/* Games List Styles */
.games-list-container {
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.page-subtitle {
    color: #7f8c8d;
    font-size: 1.125rem;
}

.games-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.games-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.games-main {
    min-height: 600px;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.filter-list {
    list-style: none;
}

.filter-item {
    margin-bottom: 0.5rem;
}

.filter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s ease;
    border-radius: 4px;
}

.filter-link:hover,
.filter-link.active {
    color: #3498db;
    background: #f8f9fa;
    padding-left: 0.5rem;
}

.filter-count {
    font-size: 0.75rem;
    color: #95a5a6;
}

.no-games {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.no-games-icon {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 1rem;
}

.no-games-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.no-games-message {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

/* Search Results Styles */
.search-results-container {
    padding: 2rem 0;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.search-subtitle {
    color: #7f8c8d;
}

.search-form-section {
    margin-bottom: 3rem;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    background: white;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.search-input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    outline: none;
}

.search-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #2980b9;
}

.search-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.search-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.search-main {
    min-height: 600px;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-result-item {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 1.5rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.search-result-image {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-result-item:hover .search-result-overlay {
    opacity: 1;
}

.search-result-overlay .play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.search-result-title a {
    color: #2c3e50;
}

.search-result-title a:hover {
    color: #3498db;
}

.search-result-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7f8c8d;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.search-result-category a {
    color: #7f8c8d;
}

.search-result-category a:hover {
    color: #3498db;
}

.search-result-description {
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.search-result-tags {
    margin-bottom: 1rem;
}

.search-result-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #95a5a6;
}

.search-result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-self: start;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.no-results-icon {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 1rem;
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.no-results-message {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.no-results-suggestions {
    margin-bottom: 2rem;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.no-results-suggestions h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.no-results-suggestions ul {
    color: #7f8c8d;
    padding-left: 1.5rem;
}

.no-results-suggestions li {
    margin-bottom: 0.5rem;
}

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

/* Like Button Animation */
.btn.liked {
    animation: likeAnimation 0.3s ease;
}

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

.game-detail-container .sidebar-compact {
    font-size: 0.8rem;
    width: 190px !important;
    flex: 0 0 190px !important;
    max-width: 190px !important;
}

.game-detail-container .games-content-wrapper {
    flex: 1;
    min-width: 0;
}

.game-detail-container .sidebar-compact .list-group-item {
    padding: 0.3125rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    margin-bottom: 0.125rem;
    cursor: pointer;
}

.game-detail-container .sidebar-compact .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.game-detail-container .sidebar-compact .list-group-item.active {
    background-color: #fff !important;
    color: #000 !important;
}

.game-detail-container .sidebar-compact h5 {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.game-detail-container .sidebar-compact .fas {
    font-size: 0.75rem;
}


.rating-component { display: inline-flex; align-items: center; gap: 8px; }
.rating-stars { display: flex; gap: 4px; cursor: pointer; padding: 2px 4px; border-radius: 6px; transition: background-color 0.2s; position: relative; }
.rating-wrapper.rated .rating-stars { cursor: not-allowed; opacity: .85; }
.star { font-size: 18px; color: #999; transition: transform .15s ease, color .15s ease; user-select: none; cursor: pointer; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.star.filled { color: #ffd700 !important; }
.star.highlight { transform: scale(1.15); color: #ffd700 !important; }
.rating-score { font-weight: 600; color: #bbb; min-width: 40px; text-align: left; }

.rating-wrapper:not(.rated) .rating-stars:hover .star.highlight {
    color: #ffd700;
    transform: scale(1.15);
}

.rating-wrapper:not(.rated) .rating-stars:hover .heart.highlight {
    color: #ff4757;
    transform: scale(1.15);
}

.star-partial, .heart-partial {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: relative;
    overflow: hidden;
    display: inline-block;
    font-size: 18px;
}
.star-partial::after {
    color: #ffd700;
}
.star-partial::after, .heart-partial::after {
    content: attr(data-icon);
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    width: var(--fill-width);
}


/* Responsive Design */
@media (max-width: 1250px) {
 
}
/* 850px ~ 1080px (最大) */
@media (max-width: 1080px) {
    .games-content,
    .search-content {
        grid-template-columns: 1fr;
    }
    
    .games-sidebar,
    .search-sidebar {
        position: static;
        order: -1;
    }
    
    .game-detail-content {
        grid-template-columns: 1fr;
    }
    
    .game-detail-sidebar {
        order: -1;
    }
    
    /* 游戏详情页侧边栏平板优化 */
    .game-detail-container .d-flex {
        
    }
    
    .game-detail-container .sidebar-compact {
        width: 100% !important;
        flex: none !important;
        max-width: none !important;
    }
    
    .game-detail-container .games-content-wrapper {
        /* flex: none; */
        padding: 0 1rem;
    }
    
    /* 游戏详情页平板优化 */
    .game-frame-container {
        margin-bottom: 1.5rem;
    }
    
    .game-detail-info-section {
        gap: 1.25rem;
    }
    
    .game-info-card {
        padding: 1.5rem;
    }
}

/* 590px ~ 850px (最大) */
@media (max-width: 850px) {
    .game-play-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .game-actions {
        justify-content: center;
    }
    
    .search-result-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .search-result-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .game-detail-info-section {
        gap: 0.8125rem;
    }

    /* 游戏详情页侧边栏手机优化 */
    .game-detail-container .sidebar-compact {
        padding: 1rem;
    }
    
    .game-detail-container .sidebar-compact h5 {
        font-size: 0.9rem;
    }
    
    .game-detail-container .sidebar-compact .list-group-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* 游戏详情页手机优化 */
    .game-detail-container {
        padding: 1rem 0;
    }
    
    .breadcrumb {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem;
    }
    
    .game-detail-info-section .bg-gray-dark {
        padding: 0.3125rem 0 !important;
    }
    
    .game-info-card {
        padding: 1.25rem;
    }
    
    .game-info-card h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .game-meta {
        gap: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .badge {
        padding: 0.375rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }
    
    .btn {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.875rem !important;
    }

}

/* 330px ~ 590px (最大) */
@media (max-width: 590px) {
    .game-frame iframe {
        /* height: auto; */
        max-width: 100%;
    }
    
    .search-input-group {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-btn {
        border-radius: 0 0 12px 12px;
    }
    
    .search-input {
        border-radius: 12px 12px 0 0;
    }
    
    .game-detail-container .games-content-wrapper .d-flex {
        flex-direction: column;
    }

    /* Game detail page small-screen optimization */
    .game-frame {
        max-height: calc(100vh - 280px);
    }
    .game-frame.page-fullscreen { max-height: none !important; }
    .game-frame-aspect-ratio-container {
        aspect-ratio: auto;
        max-width: 100%;
        height: calc(100vh - 280px);
    }
    
    .game-frame-container {
        margin-bottom: 1rem;
    }
    
    .breadcrumb {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem;
    }
    
    .breadcrumb-item a {
        padding: 0.125rem 0.25rem;
    }
    
    .game-detail-info-section .bg-gray-dark {
        padding: 0.3125rem 0 !important;
        border-radius: 12px !important;
    }
    
    .game-info-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .game-info-card h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .game-meta {
        gap: 0.75rem;
    }
    
    .game-meta-item {
        font-size: 0.8125rem;
    }
    
    .instructions-content {
        font-size: 0.875rem;
        line-height: 1.6;
    }
    
    .game-specs-list li {
        padding: 0.5rem 0;
        font-size: 0.875rem;
    }
    
    .badge {
        /* padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important; */
    }
    
    .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.8125rem !important;
    }
    .game-play-overlay {
        gap: 1rem;
        margin-top: -2rem;
    }
    .game-thumbnail-top {
        height: 90px;
    }
    .play-now-button {
        padding: 0px 20px 0px 0;
    }
}

/* Page Content (Default Theme) - Dark Reading Adjustments */
.card .card-body .content-html { color: #d0d0d0; line-height: 1.8; }
.card .card-body .content-html p { color: #d0d0d0; }
.card .card-body .content-html h1,
.card .card-body .content-html h2,
.card .card-body .content-html h3,
.card .card-body .content-html h4,
.card .card-body .content-html h5,
.card .card-body .content-html h6 { color: #f0f0f0; }
.card .card-body .content-html a { color: #8ab4f8; text-decoration: underline; }
.card .card-body .content-html blockquote { color: #cccccc; border-left: 3px solid #3a3a3a; padding-left: 12px; }
.card .card-body .content-html ul,
.card .card-body .content-html ol { color: #d0d0d0; }
.card .card-body pre,
.card .card-body code { color: #e2e2e2; background-color: #121212; border: 1px solid #2b2b2b; border-radius: 6px; }
.card .card-body pre { padding: 12px; overflow-x: auto; }
