/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 导航栏样式 */
nav {
    background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(238, 9, 121, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-links a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 主内容样式 */
main {
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
}

section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #ee0979;
    border-bottom: 2px solid #ff6a00;
    padding-bottom: 0.5rem;
}

/* 隐私政策和服务条款页面样式 */
main section h3 {
    font-size: 1.2rem;
    /* margin-top: 2rem; */
    margin-bottom: 1rem;
    color: #2575fc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

main section p {
    /* margin-bottom: 1.2rem; */
    line-height: 1.8;
}

main section ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

main section li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

/* 分类主题色 */
#action-games .section-title {
    border-bottom-color: #e74c3c;
}

#puzzle-games .section-title {
    border-bottom-color: #2ecc71;
}

#adventure-games .section-title {
    border-bottom-color: #f39c12;
}

#arcade-games .section-title {
    border-bottom-color: #9b59b6;
}

#strategy-games .section-title {
    border-bottom-color: #3498db;
}

/* 游戏网格样式 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}
.games-grid a{
    text-decoration: none;
}

.game-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 分类卡片主题色 */
.game-card-action {
    border-top-color: #e74c3c;
}

.game-card-puzzle {
    border-top-color: #2ecc71;
}

.game-card-adventure {
    border-top-color: #f39c12;
}

.game-card-arcade {
    border-top-color: #9b59b6;
}

.game-card-strategy {
    border-top-color: #3498db;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* 分类卡片悬停效果 */
.game-card-action:hover {
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.2);
}

.game-card-puzzle:hover {
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.2);
}

.game-card-adventure:hover {
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.2);
}

.game-card-arcade:hover {
    box-shadow: 0 5px 20px rgba(155, 89, 182, 0.2);
}

.game-card-strategy:hover {
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.2);
}

.game-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.game-info {
    padding: 1rem 0.6rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 160px;
}

.game-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.game-description {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2rem;
}

.game-meta {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #888;
    /* margin-top: auto; */
}

.game-tags {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    max-height: 3rem;
    overflow: hidden;
}

.game-tag {
    display: inline-block;
    padding: 0.15rem 0.3rem;
    font-size: 0.6rem;
    background-color: #fff3f5;
    color: #ee0979;
    border: 1px solid rgba(238, 9, 121, 0.2);
    border-radius: 999px;
}

/* 工具栏与分页 */
.toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.toolbar input[type="text"],
.toolbar select {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    min-width: 180px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 0.8rem;
    border: 1px solid #d8e1ff;
    background: #fff;
    color: #ee0979;
    border-radius: 6px;
    cursor: pointer;
}

.pagination button.active {
    background: #ee0979;
    color: #fff;
    border-color: #ee0979;
}

/* 详情页样式 */
.game-details {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.game-image {
    flex: 1;
}

.game-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.game-info-full {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-info-full h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.game-info-full p {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.play-button {
    display: inline-block;
    background-color: #ff6a00;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(255, 106, 0, 0.3);
}

.play-button:hover {
    background-color: #e65100;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 106, 0, 0.4);
}

.fav-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 2px solid #ee0979;
    color: #ee0979;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.8rem;
}

.fav-button:hover {
    background: rgba(238, 9, 121, 0.08);
}

.fav-button.favorited {
    background: #ee0979;
    color: #fff;
    border-color: #ee0979;
}

.fav-button .fav-heart {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.fav-button.favorited .fav-heart {
    transform: scale(1.2);
}

.game-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* 相关游戏样式 */
.related-games {
    margin-top: 3rem;
}

.related-games .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    box-shadow: 0 -2px 10px rgba(238, 9, 121, 0.3);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.footer-links li {
    margin-left: 1.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffd700;
}

.copyright {
    font-size: 0.9rem;
    color: #95a5a6;
}

/* 联系表单样式 */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #6a11cb;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ee0979;
    box-shadow: 0 0 0 2px rgba(238, 9, 121, 0.1);
}

.submit-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(238, 9, 121, 0.3);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(238, 9, 121, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        clip-path: circle(0px at 90% -10%);
        -webkit-clip-path: circle(0px at 90% -10%);
        transition: all 0.5s ease-out;
        pointer-events: none;
        box-shadow: 0 5px 15px rgba(238, 9, 121, 0.3);
    }

    .nav-links.active {
        clip-path: circle(1500px at 90% -10%);
        -webkit-clip-path: circle(1500px at 90% -10%);
        pointer-events: all;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .game-details {
        flex-direction: column;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        margin-top: 1rem;
        justify-content: center;
    }

    .footer-links li {
        margin: 0 0.75rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    main {
        padding: 0 1rem;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }

    .game-thumb {
        height: 100px;
    }

    .game-info {
        min-height: 140px;
    }
    .game-tags{
        max-height: 3.2rem;
    }
}

.empty-state {
    padding: 2rem;
    background: #fff;
    border: 1px dashed rgba(238, 9, 121, 0.3);
    border-radius: 8px;
    text-align: center;
    color: #888;
}

/* ===== Hero区域 ===== */
.hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: #fff;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ff6a00 0%, #ee0979 50%, #6a11cb 100%);
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 3rem 2rem;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    opacity: 0.92;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.hero-btn-primary {
    background: #ffd700;
    color: #333;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.hero-btn-primary:hover {
    background: #ffe44d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.hero-btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.hero-stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Tag标签组 ===== */
.tags-section {
    margin-bottom: 2.5rem;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag-pill {
    display: inline-block;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 50px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tag-pill.tag-action { background: #e74c3c; }
.tag-pill.tag-puzzle { background: #2ecc71; }
.tag-pill.tag-adventure { background: #f39c12; }
.tag-pill.tag-arcade { background: #9b59b6; }
.tag-pill.tag-strategy { background: #3498db; }
.tag-pill.tag-simulation { background: #1abc9c; }
.tag-pill.tag-sports { background: #e67e22; }
.tag-pill.tag-default { background: #ee0979; }

/* ===== 轮播图 ===== */
.carousel-section {
    margin-bottom: 3rem;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel-track-container {
    overflow: hidden;
    flex: 1;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    flex: 0 0 100%;
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
}

.carousel-card {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.carousel-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.carousel-card-body {
    padding: 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.carousel-card-body h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-card-body p {
    font-size: 0.78rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.carousel-card-body .carousel-tag {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    border-radius: 50px;
    color: #fff;
    align-self: flex-start;
}

.carousel-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(238, 9, 121, 0.9);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(238, 9, 121, 0.3);
}

.carousel-btn:hover {
    background: #ee0979;
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: #ee0979;
    transform: scale(1.2);
}

/* ===== Why Us区域 ===== */
.why-us-section {
    margin-bottom: 3rem;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.why-us-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.8rem 1.2rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-us-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.why-us-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.why-us-card h3 {
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.why-us-card p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

/* ===== FAQ区域 ===== */
.faq-section {
    margin-bottom: 3rem;
}


.faq-item {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: rgba(238, 9, 121, 0.04);
}

.faq-arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    color: #ee0979;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 1.2rem 1rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
}

.faq-answer a {
    color: #ee0979;
    text-decoration: underline;
}

/* ===== 首页内容丰富区 ===== */


.home-content-section h3 {
    font-size: 1.25rem;
    color: #2575fc;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.home-content-section p {
    line-height: 1.8;
    margin-bottom: 0.8rem;
    color: #444;
}

/* ===== 响应式补充 ===== */
@media (max-width: 768px) {
    .hero {
        min-height: 360px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat-num {
        font-size: 1.5rem;
    }

    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-slide {
        gap: 0.6rem;
    }

    .carousel-card img {
        height: 120px;
    }

    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 320px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-btn {
        width: 100%;
        max-width: 260px;
        text-align: center;
    }

    .hero-stats {
        gap: 1rem;
    }

    .hero-stat-num {
        font-size: 1.3rem;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
    }

    .carousel-slide {
        gap: 0.4rem;
    }

    .carousel-card img {
        height: 100px;
    }

    .carousel-card-body h4 {
        font-size: 0.85rem;
    }

    .carousel-card-body p {
        font-size: 0.72rem;
    }
}
