/* CSS变量定义 - 统一色彩方案 */
:root {
    /* 主色调 - 增强对比度和视觉效果 */
    --primary-color: #9c27b0;
    --primary-dark: #673ab7;
    --primary-light: #ba68c8;
    --secondary-color: #2196f3;
    --accent-color: #ff5722;
    
    /* 背景色 - 更柔和的深色背景 */
    --background-color: #121212;
    --card-background: #1e1e1e;
    --card-background-hover: #2a2a2a;
    
    /* 文字颜色 - 增强可读性 */
    --text-primary: #ffffff;
    --text-secondary: #b0bec5;
    --text-light: #ffffff;
    --text-muted: #78909c;
    
    /* 边框和阴影 - 增强层次感 */
    --border-color: #37474f;
    --border-color-light: #455a64;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 12px 40px rgba(156, 39, 176, 0.35);
    --shadow-glow: 0 0 20px rgba(156, 39, 176, 0.2);
    
    /* 过渡和圆角 - 更平滑的过渡效果 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-full: 50%;
}

/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #121212;
    background: linear-gradient(135deg, var(--background-color) 0%, #1e1e1e 100%);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 修复赞赏图标样式 */
.icon-container {
    display: flex;
    align-items: center;
}

.icon-container img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

/* 侧边栏全面优化 */
.sidebar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--primary-light) 100%) !important;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    overflow: hidden;
    border-radius: 0 12px 12px 0;
    margin: 0;
    max-height: 100vh;
    overflow-y: auto;
    z-index: 1001;
}

/* 侧边栏装饰效果 */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
}

/* 侧边栏背景装饰 */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* 优化侧边栏Logo区域 */
.sidebar .logo {
    padding: 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar .logo a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-light) !important;
    transition: var(--transition);
}

.sidebar .logo img {
    width: 40px !important;
    height: 40px !important;
    margin-right: 0;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sidebar .logo:hover img {
    transform: scale(1.15) rotate(5deg);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.sidebar .logo .simple-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light) !important;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.sidebar .logo:hover .simple-text {
    transform: translateX(5px);
}

/* 优化侧边栏导航 */
.sidebar-wrapper {
    position: relative;
    z-index: 1;
}

.sidebar-wrapper .nav {
    padding: 15px 0;
    list-style: none;
}

.sidebar-wrapper .nav li {
    transition: var(--transition);
    animation: slideInLeft 0.5s ease-out forwards;
    opacity: 0;
}

/* 导航项依次进入动画 */
.sidebar-wrapper .nav li:nth-child(1) { animation-delay: 0.1s; }
.sidebar-wrapper .nav li:nth-child(2) { animation-delay: 0.2s; }
.sidebar-wrapper .nav li:nth-child(3) { animation-delay: 0.3s; }
.sidebar-wrapper .nav li:nth-child(4) { animation-delay: 0.4s; }
.sidebar-wrapper .nav li:nth-child(5) { animation-delay: 0.5s; }
.sidebar-wrapper .nav li:nth-child(6) { animation-delay: 0.6s; }
.sidebar-wrapper .nav li:nth-child(7) { animation-delay: 0.7s; }
.sidebar-wrapper .nav li:nth-child(8) { animation-delay: 0.8s; }
.sidebar-wrapper .nav li:nth-child(9) { animation-delay: 0.9s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 导航项链接样式 */
.sidebar-wrapper .nav li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: var(--transition);
    border-radius: 0 50px 50px 0;
    margin: 0 15px;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
}

/* 导航项图标样式 */
.sidebar-wrapper .nav li a i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    transition: var(--transition);
}

/* 导航项文字样式 */
.sidebar-wrapper .nav li a p {
    margin: 0 !important;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

/* 导航项背景效果 */
.sidebar-wrapper .nav li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition);
}

/* 导航项悬停效果 */
.sidebar-wrapper .nav li a:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-light) !important;
    transform: translateX(10px);
    -webkit-transform: translateX(10px);
    -moz-transform: translateX(10px);
    -o-transform: translateX(10px);
    box-shadow: var(--shadow-sm);
    -webkit-box-shadow: var(--shadow-sm);
    -moz-box-shadow: var(--shadow-sm);
}

.sidebar-wrapper .nav li a:hover::before {
    width: 100%;
}

.sidebar-wrapper .nav li a:hover i {
    transform: scale(1.2) rotate(5deg);
    color: var(--accent-color) !important;
}

/* 导航激活状态样式优化 */
.nav li.active a {
    background: rgba(255, 255, 255, 0.25) !important;
    color: var(--text-light) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--accent-color);
}

.nav li.active a i {
    color: var(--accent-color) !important;
    transform: scale(1.1);
}

/* 导航项底部分隔线 */
.sidebar-wrapper .nav li:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0 15px;
}

/* 赞赏按钮特殊样式 */
.sidebar-wrapper .nav li:last-child a {
    background: rgba(255, 87, 34, 0.2) !important;
    border-left: 4px solid var(--accent-color);
}

.sidebar-wrapper .nav li:last-child a:hover {
    background: rgba(255, 87, 34, 0.3) !important;
}

/* 优化主面板 */
.main-panel {
    background: linear-gradient(135deg, var(--background-color) 0%, #242424 100%);
    min-height: 100vh;
    margin-left: 250px;
}

/* 全局文本居中对齐 */
body {
    text-align: center;
}

h1, h2, h3, h4, h5, h6 {
    text-align: center;
}

p {
    text-align: center;
}

/* 内容容器文本居中 */
.content-container {
    text-align: center;
}

/* 游戏列表和卡片文本居中 */
.game-list, .box {
    text-align: center;
}

.game-item, .item {
    text-align: center;
}

.game-info, .desc {
    text-align: center;
}

.game-title, .logo {
    text-align: center;
    justify-content: center;
}

/* 优化内容区域，添加顶部间距避免被固定元素遮挡 */
.content {
    padding: 20px;
    margin-top: 20px; /* 与侧边栏"平平的小破站"文字对齐 */
}

/* 优化内容容器显示 */
.content-container {
    border: 1px solid var(--border-color);
    width: 100%;
    min-height: 800px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    padding: 20px;
    overflow: auto;
}

/* 加载状态样式 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--text-secondary);
}

.loading-container .loading {
    margin-bottom: 15px;
    width: 30px;
    height: 30px;
    border-width: 3px;
}

/* 游戏页面主容器样式 */
.main {
    max-width: 1200px;
    margin: 0 auto;
}

.main h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.source-note {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-style: italic;
}

/* 页脚样式 */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 新增h1主标题样式，固定在导航栏下方 */
.main-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    padding: 18px 25px;
    background: rgba(45, 45, 45, 0.95);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--primary-color);
    transition: var(--transition);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1000;
    backdrop-filter: blur(15px);
    max-width: 1160px;
    margin: 0 auto 20px;
    letter-spacing: -0.5px;
    text-align: center;
}

.main-title:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    background: rgba(54, 54, 54, 0.98);
}

/* 优化版权信息样式 */
.sidebar-wrapper > div {
    margin-top: 30px;
    padding: 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeIn 0.8s ease-out 1s both;
}

.sidebar-wrapper > div hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 15px 0;
}

.sidebar-wrapper > div p {
    margin: 8px 0;
    line-height: 1.5;
}

.sidebar-wrapper > div a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-weight: 500;
}

.sidebar-wrapper > div a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.sidebar-wrapper > div a:hover {
    color: var(--accent-color) !important;
    text-decoration: none !important;
}

.sidebar-wrapper > div a:hover::after {
    width: 100%;
}

/* ICP备案信息样式 */
.icp-record {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.icp-record:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .main-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 1024px) {
    /* 在中等屏幕上调整侧边栏宽度 */
    .sidebar {
        width: 200px;
    }
    
    .main-panel {
        margin-left: 200px;
    }
    
    .sidebar .logo .simple-text {
        font-size: 1rem;
    }
    
    .sidebar-wrapper .nav li a {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    /* 调整侧边栏布局 */
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: -100%;
        transition: left 0.3s ease;
        z-index: 2000;
    }
    
    /* 侧边栏展开状态 */
    .sidebar.expanded {
        left: 0;
    }
    
    /* 主面板在移动端占据整个宽度 */
    .main-panel {
        margin-left: 0;
        width: 100%;
    }
    
    /* 侧边栏导航默认显示 */
    .sidebar-wrapper {
        max-height: none;
        overflow: visible;
        background: rgba(123, 31, 162, 0.95);
    }
    
    /* 调整固定主标题在移动端的样式 */
    .main-title {
        font-size: 1.3rem;
        padding: 10px 15px;
        top: 10px;
        left: 15px;
        right: 15px;
    }
    
    /* 调整内容区域在移动端的顶部间距 */
    .content {
        padding: 15px;
        margin-top: 150px; /* 导航栏(50px) + 标题栏(约80px) + 间距 */
    }
    
    .content-container {
        min-height: 600px;
        padding: 15px;
    }
    
    .sidebar-wrapper .nav li a {
        padding: 10px 15px;
    }
    
    /* 调整游戏卡片布局 */
    .game-list,
    .box {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .main h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* 调整固定导航栏在小屏幕上的样式 */
    .navbar {
        padding: 8px 12px;
        height: 45px;
    }
    
    /* 调整固定主标题在小屏幕上的样式 */
    .main-title {
        font-size: 1.1rem;
        padding: 8px 12px;
        top: 10px;
        left: 12px;
        right: 12px;
    }
    
    /* 调整内容区域在小屏幕上的顶部间距 */
    .content {
        padding: 12px;
        margin-top: 100px; /* 标题栏(约80px) + 间距 */
    }
    
    .content-container {
        min-height: 500px;
    }
    
    /* 调整游戏卡片布局 */
    .game-list,
    .box {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .main h1 {
        font-size: 1.3rem;
    }
    
    .logo {
        font-size: 1rem;
        padding: 8px;
    }
    
    .logo img {
        width: 30px;
        height: 30px;
    }
    
    .desc {
        font-size: 0.85rem;
        padding: 10px;
        height: 30px;
    }
}

/* 添加加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-title {
    animation: fadeIn 0.6s ease-out;
}

.content-container {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* 游戏列表样式优化 */
.game-list,
.box {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
    margin-bottom: 40px;
    overflow: hidden;
}

/* 子分类样式 */
.sub-category > div {
    padding: 12px 0 0 2.1%;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.game-item,
.item {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.game-item:hover,
.item:hover {
    transform: translateY(-5px) scale(1.02);
    -webkit-transform: translateY(-5px) scale(1.02);
    -moz-transform: translateY(-5px) scale(1.02);
    -o-transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
    -webkit-box-shadow: var(--shadow-lg);
    -moz-box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.game-item a,
.box a {
    display: block;
    text-decoration: none;
    color: var(--text-primary);
    height: 100%;
}

/* 无logo样式 */
.no-logo {
    color: var(--primary-light);
    font-weight: bold;
    font-size: 14px;
}

.game-item img,
.logo img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.game-item:hover img,
.item:hover .logo img {
    transform: scale(1.15) rotate(5deg);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md);
}

.game-info,
.desc {
    padding: 15px;
    flex-grow: 1;
    background: var(--card-background);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    height: 35px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.game-title,
.logo {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: 40px;
}

.game-item:hover .game-title,
.item:hover .logo {
    color: var(--accent-color);
}

/* 游戏卡片头部背景效果 */
.logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

/* 游戏卡片头部悬停效果 */
.item:hover .logo::before {
    left: 100%;
}

/* 游戏来源分隔符 */
.source-divider {
    grid-column: 1 / -1;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-radius: var(--border-radius);
    font-weight: 600;
    margin: 20px 0;
}

/* 搜索和筛选功能样式 */
.search-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.search-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 0 15px;
    transition: var(--transition);
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px rgba(123, 31, 162, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

.search-box i {
    color: var(--text-secondary);
    margin-right: 10px;
    font-size: 1.1rem;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    padding: 12px 0;
    font-size: 1rem;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-btn {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 搜索结果统计 */
.search-results {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* 页面容器样式 */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题样式 */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    color: var(--accent-color);
}

/* 联系页面样式 */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.contact-item {
    background: var(--card-background);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.contact-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

.contact-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 赞赏页面样式 */
.donation-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-background);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.donation-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.donation-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
}

.donation-qr {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.donation-qr-item {
    text-align: center;
}

.donation-qr-item img {
    width: 200px;
    height: 200px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.donation-qr-item:hover img {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.donation-qr-label {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--card-background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

/* 提示信息样式 */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    color: #e57373;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    color: #64b5f6;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination-item {
    padding: 10px 15px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.pagination-item:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.pagination-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(123, 31, 162, 0.2);
    color: var(--primary-light);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: var(--transition);
}

.tag:hover {
    background: rgba(123, 31, 162, 0.3);
    transform: translateY(-1px);
}

/* 卡片样式 */
.card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

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

.card-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* 分隔线样式 */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }

.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 30px; }

.ml-1 { margin-left: 5px; }
.ml-2 { margin-left: 10px; }
.ml-3 { margin-left: 15px; }
.ml-4 { margin-left: 20px; }
.ml-5 { margin-left: 30px; }

.mr-1 { margin-right: 5px; }
.mr-2 { margin-right: 10px; }
.mr-3 { margin-right: 15px; }
.mr-4 { margin-right: 20px; }
.mr-5 { margin-right: 30px; }

.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }
.p-5 { padding: 30px; }

/* 玻璃态效果 */
.glassmorphism {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

/* 渐变文本 */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 动画类 */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.slide-down {
    animation: slideDown 0.6s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

/* 动画定义 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 游戏卡片入场动画 */
.box a {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 为每个游戏卡片添加不同的延迟 */
.box a:nth-child(1) { animation-delay: 0.1s; }
.box a:nth-child(2) { animation-delay: 0.15s; }
.box a:nth-child(3) { animation-delay: 0.2s; }
.box a:nth-child(4) { animation-delay: 0.25s; }
.box a:nth-child(5) { animation-delay: 0.3s; }
.box a:nth-child(6) { animation-delay: 0.35s; }
.box a:nth-child(7) { animation-delay: 0.4s; }
.box a:nth-child(8) { animation-delay: 0.45s; }
.box a:nth-child(n+9) { animation-delay: 0.5s; }

/* 搜索和筛选容器动画 */
.search-filter-container {
    animation: slideDown 0.6s ease-out;
}

/* 搜索结果统计动画 */
.search-results {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* 按钮点击反馈动画 */
.btn, .filter-btn {
    transition: var(--transition);
}

.btn:active, .filter-btn:active {
    transform: scale(0.95);
}

/* 游戏卡片悬停效果增强 */
.game-item:hover,
.item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
    background-color: var(--card-background-hover);
    transition: var(--transition);
}

/* 优化游戏卡片边框和阴影 */
.game-item,
.item {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    min-width: 200px;
}

/* 加载状态动画增强 */
.loading-container {
    animation: fadeIn 0.3s ease-out;
}

.loading-container .loading {
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 页面标题动画 */
.main h1 {
    animation: slideInLeft 0.6s ease-out;
}

.source-note {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* 页脚动画 */
.footer {
    animation: fadeIn 1s ease-out 0.4s both;
}

/* 滚动平滑效果 */
html {
    scroll-behavior: smooth;
}

/* 响应式动画调整 */
@media (max-width: 768px) {
    /* 减少动画延迟，加快页面加载感 */
    .box a {
        animation-delay: 0.05s !important;
    }
    
    .box a:nth-child(n+5) {
        animation-delay: 0.1s !important;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 选择文本样式 */
::selection {
    background: rgba(123, 31, 162, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(123, 31, 162, 0.3);
    color: var(--text-primary);
}