* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 头部导航 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-box {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tagline {
    font-weight: 500;
    color: #667eea;
}

/* 语言切换器 */
.language-switcher {
    position: relative;
}

.language-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid #667eea;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-btn:hover {
    background: #667eea;
    color: white;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    overflow: hidden;
    display: none;
    z-index: 1001;
}

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

.language-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-option:hover {
    background: #f5f5f5;
}

.language-option.active {
    background: #667eea;
    color: white;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 0;
}

.nav-item {
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 特殊导航项样式 */
.nav-item-special {
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.nav-item-new {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24) !important;
    color: white !important;
    border: none;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

.nav-item-new:hover {
    background: linear-gradient(135deg, #ee5a24, #d63031) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4) !important;
}

.nav-item-top {
    background: linear-gradient(135deg, #feca57, #ff9ff3) !important;
    color: white !important;
    border: none;
    box-shadow: 0 2px 10px rgba(254, 202, 87, 0.3);
}

.nav-item-top:hover {
    background: linear-gradient(135deg, #ff9ff3, #e84393) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 15px rgba(254, 202, 87, 0.4) !important;
}

.nav-item-special::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: left 0.5s ease;
}

.nav-item-special:hover::before {
    left: 100%;
}

/* 主要内容区域 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 特色游戏区域 */
.featured-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* 游戏网格 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.game-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.game-thumbnail {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
}

.game-info {
    padding: 20px;
}

.game-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.game-category {
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.game-description {
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
    line-height: 1.4;
}

/* 分类展示区域 */
.category-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

/* 游戏模态框 */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1400px;
    height: 90%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.game-main-area {
    display: flex;
    height: calc(100% - 80px);
}

.game-frame {
    flex: 1;
    border: none;
    background: #f8f9fa;
}

.game-details-sidebar {
    width: 350px;
    background: #f8f9fa;
    border-left: 1px solid #e9ecef;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 游戏信息区域 */
.game-info-section {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    flex: 1;
}

.game-info-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.game-category-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.game-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.game-meta {
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.meta-label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.meta-value {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-tag {
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 推荐游戏区域 */
.recommendations-section {
    padding: 25px;
    background: white;
}

.recommendations-section h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.recommended-games {
    display: grid;
    gap: 12px;
}

.recommended-game-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e9ecef;
}

.recommended-game-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recommended-game-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    color: white;
}

.recommended-game-info {
    flex: 1;
}

.recommended-game-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 2px;
}

.recommended-game-category {
    font-size: 0.8rem;
    color: #666;
}

/* 响应式设计更新 */
@media (max-width: 1200px) {
    .game-details-sidebar {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 98%;
        height: 95%;
    }
    
    .game-main-area {
        flex-direction: column;
    }
    
    .game-frame {
        height: 60%;
    }
    
    .game-details-sidebar {
        width: 100%;
        height: 40%;
        border-left: none;
        border-top: 1px solid #e9ecef;
    }
    
    .game-info-section {
        padding: 20px;
    }
    
    .recommendations-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .game-frame {
        height: 50%;
    }
    
    .game-details-sidebar {
        height: 50%;
    }
}

/* 页脚 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin-top: 50px;
    padding: 30px 0;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-top {
        flex-direction: column;
        gap: 15px;
    }

    .search-container {
        margin: 0;
        max-width: 100%;
    }

    .nav-right {
        flex-direction: column;
        gap: 10px;
    }

    .nav-menu {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-item {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .nav-item-special {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 10px;
    }

    .featured-section, .category-section {
        padding: 20px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .nav-right {
        flex-direction: row;
        gap: 15px;
    }

    .tagline {
        display: none;
    }
    
    .nav-item {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    
    .nav-item-special {
        font-size: 0.75rem;
        padding: 5px 6px;
    }
}

/* 后台管理系统样式 */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    backdrop-filter: blur(10px);
}

.admin-container {
    width: 95%;
    max-width: 1200px;
    height: 90%;
    margin: 2.5% auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.admin-login-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
}

.admin-login-box h2 {
    margin-bottom: 30px;
    color: #333;
}

.admin-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.admin-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-tab.active {
    background: white;
    border-bottom: 3px solid #667eea;
    color: #667eea;
}

.admin-tab:hover {
    background: #e9ecef;
}

.admin-content {
    padding: 30px;
    height: calc(100% - 140px);
    overflow-y: auto;
}

.admin-toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.admin-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #667eea;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.admin-btn-secondary {
    background: #6c757d;
}

.admin-btn-secondary:hover {
    background: #5a6268;
}

.admin-btn-danger {
    background: #dc3545;
}

.admin-btn-danger:hover {
    background: #c82333;
}

.admin-input, .admin-select, .admin-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
    border-color: #667eea;
}

.admin-textarea {
    min-height: 80px;
    resize: vertical;
}

.admin-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.admin-games-list {
    display: grid;
    gap: 15px;
}

.admin-game-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.admin-game-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.game-item-info {
    flex: 1;
}

.game-item-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.game-item-meta {
    color: #666;
    font-size: 14px;
}

.game-item-actions {
    display: flex;
    gap: 10px;
}

.batch-options {
    display: grid;
    gap: 30px;
}

.batch-method {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
}

.batch-method h4 {
    margin-bottom: 15px;
    color: #333;
}

.iframe-detector {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
}

.iframe-results {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.iframe-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.data-management {
    display: grid;
    gap: 30px;
}

.data-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
}

.data-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.stats-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .admin-container {
        width: 98%;
        height: 95%;
        margin: 1% auto;
    }

    .admin-content {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-tabs {
        flex-wrap: wrap;
    }

    .admin-tab {
        flex: none;
        min-width: 120px;
    }
}

/* 新增的SEO优化样式 */

/* 分类卡片样式 */
.category-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.category-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.category-card p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* FAQ样式 */
.faq-section {
    background: #f8f9fa;
    padding: 60px 20px;
    margin: 40px 0;
    border-radius: 16px;
}

.faq-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    position: relative;
    padding-right: 30px;
}

.faq-item h3::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.5rem;
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-item:hover h3::after {
    transform: rotate(45deg);
}

/* 面包屑导航样式 */
nav[aria-label="Breadcrumb"] {
    border-bottom: 1px solid #e9ecef;
}

nav[aria-label="Breadcrumb"] a:hover {
    color: #0056b3 !important;
    text-decoration: underline !important;
}

/* 改进的搜索框样式 */
.search-container {
    position: relative;
}

.search-box {
    padding-left: 45px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: none;
}

/* 语义化标签样式优化 */
main[role="main"] {
    min-height: 60vh;
}

header[role="banner"] {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* 游戏网格的可访问性改进 */
.games-grid[role="region"] {
    outline: none;
}

.games-grid[role="region"]:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 4px;
    border-radius: 8px;
}

/* 改进的按钮样式 */
button, .nav-item, .game-card {
    transition: all 0.3s ease;
}

button:focus, .nav-item:focus, .game-card:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 响应式改进 */
@media (max-width: 768px) {
    .category-card {
        padding: 20px;
    }
    
    .faq-section {
        padding: 40px 15px;
    }
    
    nav[aria-label="Breadcrumb"] {
        padding: 8px 0;
    }
    
    nav[aria-label="Breadcrumb"] ol {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .category-card h3 {
        font-size: 1.1rem;
    }
    
    .category-card p {
        font-size: 0.9rem;
    }
    
    .faq-item {
        padding: 15px !important;
    }
}

/* 性能优化 - 减少重绘 */
* {
    box-sizing: border-box;
}

img, iframe {
    max-width: 100%;
    height: auto;
}

/* 打印样式 */
@media print {
    .header, .footer, .admin-panel, .game-modal {
        display: none !important;
    }
    
    .main-container {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .section-title {
        color: #000 !important;
    }
}