:root {
    --primary-color: #3498db;
    --secondary-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --text-color: #333;
    --container-width: 1200px;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
    overflow-x: hidden;
}

/* Fixed Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

a {
    text-decoration: none; /* 去除下划线 */
    color: inherit; /* 继承父元素的文本颜色 */
}

.pb0 {
    padding-bottom: 0rem !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

.language-switcher {
    position: relative;
}

.language-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    width: 200px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 0.5rem;
    display: none;
    flex-direction: column;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.language-dropdown.show {
    display: flex;
}

.language-dropdown a {
    padding: 0.75rem 1rem;
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s;
}

.language-dropdown a:hover {
    background: var(--light-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--dark-color);
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.mobile-menu.show {
    display: flex;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-language-select {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-left: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.mobile-language-select.show {
    display: flex;
}

.mobile-language-select a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main Content */
main {
    margin-top: 80px;
}

.section {
    padding: 1.5rem 1rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section_ad {
    padding: 0rem 1rem;
}

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

@media (max-width: 900px) {
    .game-container {
        grid-template-columns: 1fr;
    }
    
    .ad-sidebar {
        display: none;
    }

    nav ul {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

.game-content {
    display: flex;
    flex-direction: column;
    height: 600px;
}

.game-iframe {
    width: 100%;
    flex: 1;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    background-color: #000;
}

.game-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    min-height: 70px;
}

.game-title {
    font-size: 1.2rem;
    color: var(--dark-color);
}

.toolbar-buttons {
    display: flex;
    gap: 1rem;
    position: relative;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

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

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

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

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

.share-options {
    position: absolute;
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    z-index: 10;
    min-width: 160px;
}

.share-options.show {
    display: flex;
}

.share-options a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark-color);
    transition: background 0.3s;
}

.share-options a:hover {
    background: var(--light-color);
}

.ad-container {
    background-color: #f1f1f1;
}

.ad-sidebar {
    height: 600px;
}

.ad-wide {
    width: 100%;
    height: 100%;
    min-height:150px;
    margin: 0; /* 减小上下间距 */
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    background: #40a8df;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.tag-item:hover {
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.tag-item:active {
    transform: translateY(0);
}

.tag-item::before {
    content: "#";
    margin-right: 4px;
    opacity: 0.8;
    font-weight: 600;
}

.tag-item-alt {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tag-item-alt:hover {
    background: linear-gradient(135deg, #e668e9 0%, #ee4e5e 100%);
}

.tag-item-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.tag-item-blue:hover {
    background: linear-gradient(135deg, #3ca0fd 0%, #00e1fe 100%);
}

.tag-item-green {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.tag-item-green:hover {
    background: linear-gradient(135deg, #32d96a 0%, #24e9cd 100%);
}

.tag-item-orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.tag-item-orange:hover {
    background: linear-gradient(135deg, #f85d90 0%, #fedb38 100%);
}

.tag-item-dark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tag-item-dark:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

@media (max-width: 768px) {
   .section_ad,.ad-sidebar{
     display: none;  /* 在小屏幕设备上隐藏该元素 */
  }
 .footer-links {
     gap: 1rem;
   }
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--dark-color);
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Game Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem;
    justify-content: center;
}

@media (max-width: 600px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
   .game-image {
       max-width: 100%;
       width:100%;
       height: 100%;
    }
}

.game-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
}

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

.game-card span {
    padding: 1rem;
    text-align: center;
    font-size: 1rem;
}

/* Game Intro */
.game-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.intro-title {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

@media (max-width: 900px) {
    .game-intro {
        grid-template-columns: 1fr;
    }
}

.game-image {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.game-description h3 {
    margin: 1.5rem 0 0.5rem;
    color: var(--dark-color);
}

.game-description h3:first-child {
    margin-top: 0;
}

.game-description ul {
    margin-left: 1.5rem;
}

.game-description li {
    margin-bottom: 0.5rem;
}

/* FAQ */
.faq-item {
    margin-bottom: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.faq-question {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Comments */
.comments-container {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.comment-form {
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

.rating-stars {
    display: flex;
    gap: 0.5rem;
}

.star {
    color: var(--gray-color);
    cursor: pointer;
    font-size: 1.5rem;
}

.star.active {
    color: #f1c40f;
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.btn-submit:disabled {
    background-color: var(--gray-color);
    cursor: not-allowed;
}

.comment-list {
    margin-top: 2rem;
}

.comment {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--light-color);
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex-grow: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
}

.comment-rating {
    color: #f1c40f;
    font-size: 1.2rem;
}

.notification {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: none;
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--dark-color);
    color: white;
}

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Breadcrumb */
.breadcrumb-section {
    background-color: #f8f9fa;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.breadcrumb ol {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.breadcrumb li {
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin-left: 8px;
    color: #6c757d;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb li:last-child {
    color: #6c757d;
}

.game-grid-section {
    background-color: #f5f5f5;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 600px; 
    margin: 0; 
    padding: 0; 
    overflow: hidden; 
}

.game-grid-clayover {
    display: grid;
    grid-gap: 15px; 
    gap: 15px;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 190px;
    height: 100%; 
    padding: 0; 
    margin: 0; 
    box-sizing: border-box;
}

.game-card-large {
    grid-column: span 2;
    grid-row: span 2;
    height: 100%;
}

.game-grid-section .game-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    aspect-ratio: 1/1; 
    animation: gameCardFadeIn 0.5s ease forwards;
    opacity: 0;
    margin: 0; 
    height: 100%; 
}

.game-grid-section .game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.game-card-inner {
    height: 100%;
    width: 100%;
}

.game-card-link {
    display: block;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.game-card-thumb {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.game-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-grid-section .game-card:hover .game-card-thumb img {
    transform: scale(1.05);
}

.game-card-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.game-card-text span {
    font-weight: bold;
    font-size: 1rem;
    display: block;
    text-align: center;
    color: white;
}

.game-card-text h1 {
    font-weight: bold;
    font-size: 1rem;
    display: block;
    text-align: center;
    color: white;
    margin: 0;
    padding: 0;
}

.game-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(233, 69, 96, 0.3), rgba(0, 178, 255, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-grid-section .game-card:hover .game-card-bg {
    opacity: 1;
}

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

@media (max-width: 768px) {
    .game-grid-section {
        height: auto; 
        min-height: 600px;
        padding: 10px; 
    }
    
    .game-grid-clayover {
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 10px; 
        padding: 0; 
        margin: 0;
        grid-auto-rows: minmax(150px, auto); 
    }
    
    .game-card-large {
        grid-column: 1 / -1; 
        grid-row: span 1; 
        aspect-ratio: 2/1; 
    }
    
    .game-grid-section .game-card:not(.game-card-large) {
        aspect-ratio: 1/1;
        width: 100%; 
        height: auto; 
    }
}

@media (max-width: 480px) {
    .game-grid-section {
        padding: 8px;
    }
    
    .game-grid-clayover {
        gap: 8px;
        grid-template-columns: 1fr 1fr; 
    }
    
    .game-card-large {
        aspect-ratio: 16/9; 
    }
}