/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* 隐藏滚动条但保留滚动功能 */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 顶部导航栏 - 专业风格 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary);
    color: white;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0 5%;
}

.top-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.logo img {
    height: 36px;
    width: auto;
    display: block;
}

.logo span {
    color: white;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary);
}

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

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    background-color: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 20px;
    padding: 10px 15px 10px 40px;
    color: white;
    width: 200px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    width: 250px;
    background-color: rgba(255, 255, 255, 0.2);
}

.search-box i {
    position: absolute;
    left: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.user-btn {
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* 主内容区 */
.main-container {
    max-width: 1400px;
    margin: 100px auto 40px;
    padding: 0 20px;
    display: flex;
    gap: 30px;
}

/* 左侧导航栏 - 现代化设计 */
.left-nav {
    flex: 0 0 260px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.left-nav-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: white;
    text-align: center;
}

.left-nav-header h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.left-nav-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.left-nav-list {
    padding: 15px 0;
}

.left-nav-item {
    padding: 18px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.left-nav-item:hover {
    background-color: rgba(52, 152, 219, 0.05);
    color: var(--secondary);
    border-left-color: var(--secondary);
}

.left-nav-item.active {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--secondary);
    border-left-color: var(--secondary);
    font-weight: 600;
}

.left-nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* 右侧内容区 */
.right-content {
    flex: 1;
}

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

.content-header h2 {
    font-size: 2.2rem;
    color: var(--primary);
    position: relative;
    padding-bottom: 10px;
}

.content-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    border-radius: 2px;
}

.content-list {
    display: none;
}

.content-list.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片设计 - 现代化专业风格 */
.cards-grid {
    display: grid;
    gap: 25px;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.card::before {
    content: attr(data-rank);
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    color: white;
    text-align: center;
    line-height: 48px;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 0 12px 0 48px;
    z-index: 2;
    display: none;
}

.card:nth-child(1)::before {
    display: block;
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
}

.card:nth-child(2)::before {
    display: block;
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
}

.card:nth-child(3)::before {
    display: block;
    background: linear-gradient(135deg, #c77c48 0%, #9c6534 100%);
}

.card-content {
    padding: 25px;
    display: flex;
    gap: 20px;
}

.card-image {
    flex: 0 0 300px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.platform-info {
    display: block;
    margin: 10px 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.platform-info strong {
    color: var(--primary);
}

.card-description {
    color: var(--gray);
    margin: 15px 0;
    line-height: 1.5;
}

.game-type {
    display: block;
    margin: 10px 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.game-type strong {
    color: var(--primary);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.card-tag {
    background-color: var(--light);
    color: var(--dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.card-footer {
    display: flex;
    justify-content: end;
    align-items: center;
    margin-top: 15px;
}

.card-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--light);
    border-radius: 10px;
}

.rating-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.rating-count {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 5px;
}

.card-btn {
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 60px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-btn:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    background-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* 页脚 */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 50px 5% 30px;
    margin-top: 80px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #95a5a6;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    text-decoration: underline;
}