:root {
    --primary-color: #0a192f;
    --secondary-color: #64ffda;
    --accent-color: #1e90ff;
    --text-color: #ccd6f6;
    --dark-blue: #112240;
    --light-blue: #233554;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 侧边栏导航 */
.sidebar {
    width: 250px;
    background-color: var(--dark-blue);
    padding: 2rem 1rem;
    height: 100vh;
    position: fixed;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    padding-left: 1rem;
}

.logo i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-right: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(90deg, #64ffda, #1e90ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    transform: translateX(10px);
}

.nav-item a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-item a:hover, .nav-item.active a {
    background-color: var(--light-blue);
    color: var(--secondary-color);
}

.nav-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* 主体内容区 */
.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 2rem;
}

/* 头部语言切换 */
.header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2rem;
}

.language-switcher {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.current-language {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}

.current-language img {
    width: 20px;
    height: 15px;
    margin-right: 0.5rem;
    border-radius: 2px;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--dark-blue);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
    width: 150px;
    display: none;
    z-index: 10;
}

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

.language-option {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.language-option:hover {
    background-color: var(--light-blue);
    color: var(--secondary-color);
}

.language-option img {
    width: 20px;
    height: 15px;
    margin-right: 0.5rem;
    border-radius: 2px;
}

/* 轮播图 */
.carousel-container {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease;
    /*height: 210px;*/
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background-color: var(--light-blue);
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.carousel-image:hover {
    transform: scale(1.02);
}

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

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

.indicator.active {
    background-color: var(--secondary-color);
    transform: scale(1.2);
}

/* 搜索栏 */
.search-container {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    background-color: var(--dark-blue);
    color: var(--text-color);
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    padding-left: 3rem;
}

.search-bar:focus {
    outline: none;
    box-shadow: 0 5px 20px rgba(30, 144, 255, 0.3);
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
}

/* 内容列表 */
.content-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 0fr));
    gap: 2rem;
}

.content-item {
    background-color: var(--dark-blue);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.content-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(30, 144, 255, 0.3);
}

.content-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.1), rgba(30, 144, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-item:hover::before {
    opacity: 1;
}

.content-image {
    width: 100%;
    height: 140px;
}

.content-info {
    padding: 0;
    text-align: center;
}

.content-title {
    font-weight: normal;
    font-size: 15px;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.content-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color);
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
        width: calc(100% - 200px);
    }

    .content-list {
        /*grid-template-columns: repeat(auto-fill, minmax(200px, 0fr));*/
        justify-content: center;
    }
}

/* 修改原有媒体查询部分 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 60px;
        bottom: auto;
        top: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .logo {
        margin-bottom: 0;
        padding: 0 1rem;
    }

    .logo h1 {
        display: block;
        font-size: 1.2rem;
    }

    .nav-menu {
        display: flex;
        height: 100%;
        margin-right: 1rem;
    }

    .nav-item {
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .nav-item a {
        padding: 0.5rem;
        height: 100%;
        flex-direction: column;
    }

    .nav-item i {
        margin-right: 0;
        font-size: 1rem;
    }

    .nav-item span {
        display: block;
        font-size: 0.7rem;
        margin-top: 0.3rem;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 80px; /* 为顶部栏留出空间 */
    }

    .carousel-image {
        height: 150px;
    }
}

/* 新增移动端菜单动画 */
@media (max-width: 480px) {
    body {
        justify-content: space-between;
    }

    .carousel-container, .search-container {
        display: none;
    }

    .sidebar {
        width: 100px;
        position: initial;
    }

    .content-title {
        font-weight: normal;
        font-size: 14px;
    }

    .content-info {
        padding: 0;
    }

    .sidebar {
        justify-content: center;
        display: block;
        bottom: initial;
        top: initial;
        height: 100%;
        box-shadow: none;
    }

    .nav-menu {
        width: 100%;
        height: 60px;
        background: var(--primary-color);
        justify-content: space-around;
        margin: 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-item {
        display: flex;
        text-align: center;
        align-items: center;
        width: 100%;
    }

    .nav-item a {
        padding: 0.5rem;
        height: 60px;
        width: 100%;
        background-color: var(--dark-blue);
    }

    .logo {
        background-color: var(--primary-color);
        padding: 10px 0;
        display: flex;
        justify-content: center;
    }

    .logo h1 {
        text-align: center;
        font-size: 32px;
    }

    .main-content {
        width: calc(100% - 100px);
        padding: 0 10px;
    }

    .nav-item:hover {
        transform: none;
    }

    .header {
        margin-top: 20px;
    }

    .content-list {
        grid-template-columns: repeat(auto-fill, minmax(115px, 0fr));
        gap: 1rem;
    }

    .content-image {
        height: 115px;
    }
}

.mobile-menu {
    display: none;
}

@media (max-width: 480px) {
    .desktop-menu {
        display: none;
    }

    .mobile-menu {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 10px;
    }

    .mobile-menu li {
        margin-bottom: 20px;
    }

    .mobile-menu li:last-child {
        margin: 0;
    }

    .nav-item.active {
        transform: none;
    }
}

.content-list .content-item {
    cursor: pointer;
}

.game-iframe {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    display: none;
}

.game-iframe iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-iframe .close-btn {
    display: inline-block;
    position: absolute;
    left: 5px;
    top: 5px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: rgba(0, 0, 0, .6);
    border: 1px solid #044c9d;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    text-align: center;
}
