/* ========================================
   Global Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========================================
   Background Image
   ======================================== */
.page-wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background-image: url('../img/bg_main_pc.jpg');
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

@media (max-width: 768px) {
    .page-wrapper {
        background-image: url('../img/bg_main_mb.jpg');
    }
}

/* ========================================
   Navigation Bar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-logo {
    display: flex;
    align-items: center;
}

.navbar-logo img {
    height: 50px;
    width: auto;
}

.navbar-menu {
    display: flex;
    gap: 30px;
}

.navbar-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f39c12;
    transition: width 0.3s ease;
}

.navbar-menu a:hover {
    color: #f39c12;
}

.navbar-menu a:hover::after {
    width: 100%;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.social-btn svg {
    width: 18px;
    height: 18px;
}

.language-btn {
    position: relative;
    padding: 8px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 120px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s ease;
}

.language-dropdown a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
        height: 60px;
    }

    .navbar-logo img {
        height: 40px;
    }

    .navbar-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 10px;
    }

    .mobile-menu-btn span {
        width: 25px;
        height: 2px;
        background: #fff;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .mobile-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 22;
    }

    .mobile-nav.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav a {
        color: #fff;
        text-decoration: none;
        font-size: 18px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* ========================================
   Main Content Sections
   ======================================== */
main {
    padding-top: 70px;
}

section {
    padding: 60px 20px;
    max-width: 100%;
    margin: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    main {
        padding-top: 20px;
    }

    section {
        padding: 20px 20px;
        max-width: 100%;
        margin: 0;
    }
}

/* ========================================
   Hero Section (Home)
   ======================================== */
.hero-section {
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 40px;
}

.hero-content {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
}

.download-btns {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.download-btn {
    display: block;
    transition: transform 0.3s ease;
}

.download-btn:hover {
    transform: scale(1.05);
}

.download-btn img {
    height: 60px;
    width: auto;
}

.topup-button {
    display: flex;
    align-items: center;
}

.topup-button img {
    height: 130px;
    width: auto;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: calc(100vh - 500px);
    }

    .hero-content {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 20px;
    }

    .download-btn img {
        height: 50px;
    }

    .topup-button img {
        height: 110px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        flex-direction: row;
        gap: 10px;
    }

    .download-apk-btn img {
        height: 100px;
    }

    .topup-btn img{
        height: 100px;
    }

    .download-btns {
        flex-direction: column;
        justify-content: center;
        gap: 8ps;
    }

    .download-btn img {
        height: 45px;
    }

    .topup-button img {
        height: 90px;
    }
}

/* ========================================
   Characters Section
   ======================================== */
.characters-section {
    background: transparent;
}

.characters-container {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.character-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.character-icon {
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.character-icon:hover {
    opacity: 0.9;
}

.character-icon.active {
    opacity: 1;
}

.character-icon img {
    width: 100%;
    height: auto;
    display: block;
}

.character-img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-img img {
    max-width: 100%;
    height: auto;
}

.character-info {
    position: relative;
    width: 100%;
}

.character-desc {
    position: relative;
    width: 100%;
    z-index: 1;
}

.character-desc img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* 技能图标切换行：紧跟角色描述下方，正常流布局 */
.character-skill-icon-list {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 0 4px 0;
    flex-wrap: nowrap;
    position: absolute;
    top: 59%;
    left: 4%;
    z-index: 10;
}

.character-skill-icon {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0.6;
    flex-shrink: 0;
}

.character-skill-icon:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.character-skill-icon.active {
    opacity: 1;
}

.character-skill-icon img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    display: block;
}

/*
 * 技能信息图片（904×636px）上方约75%为空白，内容在底部约25%。
 * 使用 overflow:hidden + 绝对定位 bottom:0 只显示底部内容区域。
 * padding-bottom 值 = 底部内容高度 / 图片宽度 ≈ 160/904 ≈ 20%
 */
.character-skill-info {
    width: 100%;
    height: 0;
    padding-bottom: 20%;
    overflow: hidden;
    position: absolute;
    top: 72%;
    z-index: 10;
}

.character-skill-info img {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 992px) {
    .characters-container {
        grid-template-columns:50px 1fr;
    }

    .character-info {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .characters-container {
        /* grid-template-columns: 1fr; */
        gap: 0px;
    }

    .character-icons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0;
    }

    .character-icon {
        width: 70px;
    }

    .character-img img {
        max-height: 250px;
    }

    .character-skill-icon img {
        width: 48px;
        height: 48px;
    }

    /* 移动端图片等比缩小，内容区保持 20% 比例不变 */
    .character-skill-info {
        padding-bottom: 20%;
    }
}

@media (max-width: 480px) {
    .character-skill-icon img {
        width: 30px;
        height: 30px;
    }

    .character-skill-icon-list {
        gap: 6px;
        padding: 4px 0 4px 0;
    }
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery-section {
    background: transparent;
}

.gallery-carousel {
    position: relative;
    max-width: 80%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
}

.carousel-track {
    display: flex;
    overflow: hidden;
    transition: transform 0.5s ease;
}

.gallery-item {
    width: 100%;
    display: none;
}

.gallery-item.active {
    display: block;
}

.gallery-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 500px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #f39c12;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }
}

/* ========================================
   News Section
   ======================================== */
.news-section {
    background: transparent;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

.news-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 15px;
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-item .news-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.news-item h3 {
    color: #000;
    font-size: 16px;
    margin-bottom: 8px;
}

.news-item p {
    color: #333;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-item .news-image {
        height: 180px;
    }
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 40px 20px;
    margin-top: 0;
}

.footer .container {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    text-align: center;
    margin-bottom: 20px;
}

.footer-rating {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-rating img {
    height: 26px;
    width: auto;
}

.rating-badge {
    background: #f39c12;
    color: #000;
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
}

.rating-text {
    color: #fff;
    font-size: 14px;
}

.footer-links {
    display: flex;
    align-items: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #f39c12;
}

.footer-links .divider {
    margin: 0 15px;
    color: rgba(255, 255, 255, 0.3);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.footer-copyright p {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .footer {
        padding: 30px 15px;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .footer-links .divider {
        display: none;
    }

    .footer-rating img {
        height: 20px;
    }
}
