body {
    background: black;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
}

.content {
    text-align: center;
    animation: fadeInUp 2s ease-out;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 20px;
}

/* 顶部导航栏样式 */
.top-nav {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.5s ease;
    padding: 16px 24px;
}

/* 移动端导航栏容器需要相对定位以容纳菜单 */
@media (max-width: 768px) {
    .nav-container {
        position: relative;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo {
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(to right, #fff, #e5e7eb, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0 24px;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #6b7280;
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    transform: scaleX(1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 24px; /* 增加右边距，使按钮不贴边，与移动端保持一致 */
}

.hamburger {
    display: none; /* 在桌面端隐藏汉堡菜单 */
}

.settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1000;
}

.settings-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    opacity: 0.9;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.settings-btn:hover svg {
    opacity: 1;
}

.settings-btn:active {
    transform: scale(0.98);
}

/* 设置面板遮罩层 */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001; /* 在导航栏之上，但在设置面板之下 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 设置面板样式 */
.settings-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 280px;
    height: 100%;
    backdrop-filter: blur(24px);
    background: rgba(255, 255, 255, 0.02);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px;
    box-shadow: -20px 0 25px -5px rgba(0, 0, 0, 0.1), -8px 0 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1002; /* 提高层级，确保在导航栏之上 */
    transition: right 0.3s ease-in-out;
}

.settings-panel.active {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.settings-panel h2 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.25rem;
}

.settings-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.settings-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 移动端显示关闭按钮，桌面端隐藏 */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex;
    }
}

.settings-panel section {
    margin-bottom: 20px;
}

.settings-panel h3 {
    margin-bottom: 12px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.settings-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    margin-bottom: 8px;
    text-decoration: none;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.settings-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.settings-menu-item:visited {
    color: white;
    text-decoration: none;
}

.settings-menu-item:active {
    transform: scale(0.98);
}

.settings-menu-item svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    flex-shrink: 0;
}

.settings-menu-item.danger {
    border-color: rgba(255, 69, 58, 0.3);
    background: rgba(255, 69, 58, 0.1);
}

.settings-menu-item.danger:hover {
    background: rgba(255, 69, 58, 0.2);
    border-color: rgba(255, 69, 58, 0.4);
}

/* 移动端设置面板适配 */
@media (max-width: 768px) {
    .settings-panel {
        width: 85%; /* 在移动端使用85%宽度 */
        max-width: 300px; /* 限制最大宽度 */
        right: -100%; /* 完全隐藏在屏幕外 */
    }
    
    .settings-panel.active {
        right: 0;
    }
}

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



.select-box {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('https://i.ibb.co/xgDtnpy/image.png');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 40px 10px 16px;
    font-size: 14px;
    min-width: 120px;
    transition: all 0.3s ease;
}

.select-box:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.select-box:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.select-box option {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
}

.input-box {
    text-align: left;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    transition: all 0.3s ease;
    color: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.input-box:focus {
    border-color: rgba(107, 114, 128, 0.5);
    outline: transparent solid 2px;
    outline-offset: 2px;
}

.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-form .input-box {
    width: 100%;
    box-sizing: border-box;
}

/* 全局按钮样式 */
.button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.button:active {
    transform: translateY(0);
}

.login-form .button {
    margin-top: 20px; /* 增加按钮上方间距 */
    width: 100%; /* 让按钮宽度占满父容器 */
    max-width: 300px; /* 限制最大宽度 */
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    z-index: 1000;
    color: white;
    text-align: center;
}

@keyframes glitch {
    0% {
        clip: rect(42px, 9999px, 44px, 0);
        transform: skew(0.09deg);
    }
    5% {
        clip: rect(50px, 9999px, 55px, 0);
        transform: skew(0.19deg);
    }
    10% {
        clip: rect(10px, 9999px, 60px, 0);
        transform: skew(0.15deg);
    }
    15% {
        clip: rect(40px, 9999px, 80px, 0);
        transform: skew(0.23deg);
    }
    20% {
        clip: rect(20px, 9999px, 30px, 0);
        transform: skew(0.12deg);
    }
    25% {
        clip: rect(30px, 9999px, 90px, 0);
        transform: skew(0.14deg);
    }
    30% {
        clip: rect(40px, 9999px, 70px, 0);
        transform: skew(0.18deg);
    }
    35% {
        clip: rect(50px, 9999px, 50px, 0);
        transform: skew(0.22deg);
    }
    40% {
        clip: rect(60px, 9999px, 60px, 0);
        transform: skew(0.17deg);
    }
    45% {
        clip: rect(70px, 9999px, 40px, 0);
        transform: skew(0.25deg);
    }
    50% {
        clip: rect(80px, 9999px, 80px, 0);
        transform: skew(0.21deg);
    }
    55% {
        clip: rect(90px, 9999px, 60px, 0);
        transform: skew(0.16deg);
    }
    60% {
        clip: rect(100px, 9999px, 70px, 0);
        transform: skew(0.24deg);
    }
    65% {
        clip: rect(110px, 9999px, 90px, 0);
        transform: skew(0.11deg);
    }
    70% {
        clip: rect(120px, 9999px, 50px, 0);
        transform: skew(0.13deg);
    }
    75% {
        clip: rect(130px, 9999px, 30px, 0);
        transform: skew(0.20deg);
    }
    80% {
        clip: rect(140px, 9999px, 70px, 0);
        transform: skew(0.26deg);
    }
    85% {
        clip: rect(150px, 9999px, 60px, 0);
        transform: skew(0.15deg);
    }
    90% {
        clip: rect(160px, 9999px, 80px, 0);
        transform: skew(0.19deg);
    }
    95% {
        clip: rect(170px, 9999px, 40px, 0);
        transform: skew(0.23deg);
    }
    100% {
        clip: rect(180px, 9999px, 50px, 0);
        transform: skew(0.16deg);
    }
}

.glitch {
    font-size: 100px;
    font-weight: bold;
    position: relative;
    color: white;
    background: black;
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
}

.glitch::before, .glitch::after {
    content: attr(data-text); /* 使用data-text属性 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    color: white;
    clip: rect(0, 0, 0, 0);
    animation: glitch 1s infinite linear alternate-reverse;
}

/* 确保静态时也显示正确的文本 */
.glitch:not(:hover)::before,
.glitch:not(:hover)::after {
    content: attr(data-text);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 red;
    animation-delay: -0.2s;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    animation-delay: -0.3s;
}

/* 加载指示器样式 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 60px 0;
    color: rgba(255, 255, 255, 0.7);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* 游戏列表样式 */
.games-list-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.games-list {
    list-style: none;
    padding: 0;
    margin: 40px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.game-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-item:last-child {
    border-bottom: none;
}

.game-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.game-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.game-item-icon {
    font-size: 24px;
    margin-right: 16px;
    min-width: 24px;
    width: 24px;
    height: 24px;
}

.game-item-icon-wrapper {
    margin-right: 16px;
    min-width: 64px;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-item-icon-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.game-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
}

.game-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.game-item-name {
    font-size: 16px;
    font-weight: 500;
    color: white;
    margin-bottom: 4px;
}

.game-item-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.game-item-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.game-item-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.game-item-status.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.game-item-status.updating {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.game-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    margin-top: 40px;
    max-width: 800px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.5s ease-out;
}

.game-details h2 {
    margin-top: 0;
    margin-bottom: 16px;
    color: white;
    font-size: 28px;
}

.game-details p {
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* 游戏信息标签 */
.game-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.game-tag {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* 移动端适配 */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        overflow-y: auto;
        touch-action: pan-y;
    }
    
    .content {
        padding: 16px;
    }
    
    .nav-container {
        justify-content: space-between;
        padding: 12px 16px; /* 减少内边距以适应小屏幕 */
    }
    
    .nav-brand {
        flex: 1;
    }
    
    .hamburger {
        display: block;
        cursor: pointer;
        padding: 8px;
        margin-left: auto; /* 将汉堡菜单推到右侧 */
        z-index: 1003; /* 确保汉堡菜单在所有元素之上 */
    }

    .hamburger span {
        display: block;
        width: 24px;
        height: 2px;
        background: white;
        margin: 4px 0;
        transition: 0.3s;
    }
    
    .nav-menu {
        display: none; /* 在移动端先隐藏，后续添加汉堡菜单 */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 80%;
        max-width: 280px; /* 限制最大宽度 */
        flex-direction: column;
        backdrop-filter: blur(24px);
        background: rgba(255, 255, 255, 0.02);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        border-right: 1px solid rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 20px;
        gap: 12px;
        border-radius: 0 0 16px 16px; /* 添加底部圆角 */
        border-top: none;
        align-items: center; /* 居中所有菜单项 */
        z-index: 999; /* 确保菜单在正确层级 */
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
        margin: 0 auto; /* 水平居中 */
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 12px 16px;
        width: 100%; /* 设置宽度为100%以填满容器 */
        text-align: center; /* 文本居中 */
        justify-content: center;
        display: flex; /* 使用flex布局以确保内容居中 */
        align-items: center;
        box-sizing: border-box; /* 确保padding不会增加总宽度 */
    }

    .nav-right {
        gap: 8px; /* 减少间距 */
        margin-right: 16px; /* 增加右边距防止贴边 */
        padding-left: 8px; /* 添加左边距 */
    }

    .settings-btn {
        width: 40px; /* 恢复按钮尺寸便于点击 */
        height: 40px;
        padding: 8px; /* 增加内边距使点击区域更大 */
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(8px);
    }

    .settings-btn svg {
        width: 20px;
        height: 20px;
        opacity: 0.9;
    }

    .logo {
        width: 32px;
        height: 32px;
    }

    .logo-text {
        font-size: 1.25rem;
    }
}
