/* 用户界面样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* 导航栏 */
.navbar {
    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;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
}

.nav-brand i {
    margin-right: 10px;
    font-size: 1.2em;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: #667eea;
}

.admin-link {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
    transition: transform 0.3s;
}

.admin-link:hover {
    transform: translateY(-2px);
}

/* 英雄区域 */
.hero-section {
    padding: 80px 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5em;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-icon {
    display: block;
    font-size: 0.8em;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.hero-subtitle {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    margin-top: 5px;
}

/* 主要内容区域 */
.main-content {
    padding: 60px 0;
}

/* 搜索区域 */
.search-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1em;
}

.search-bar input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

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

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 游戏区域 */
.games-section {
    margin-top: 40px;
}

.section-title {
    font-size: 2em;
    color: white;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

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

.game-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.game-thumbnail {
    position: relative;
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.play-overlay {
    font-size: 4em;
    color: white;
    opacity: 0.8;
    transition: all 0.3s;
}

.game-card:hover .play-overlay {
    opacity: 1;
    transform: scale(1.1);
}

.game-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-info {
    padding: 25px;
}

.game-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.game-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: #888;
    margin-bottom: 20px;
}

.game-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-actions {
    padding: 0 25px 25px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.play-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    flex: 1;
    justify-content: center;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.favorite-btn {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.favorite-btn:hover {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: white;
}

.favorite-btn.favorited {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: white;
}

/* 无游戏状态 */
.no-games-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
}

.no-games {
    text-align: center;
    padding: 80px 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.no-games-icon {
    font-size: 5em;
    color: #667eea;
    margin-bottom: 30px;
    opacity: 0.7;
}

.no-games h3 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #333;
}

.no-games p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
    line-height: 1.6;
}

.no-games-actions {
    margin-top: 30px;
}

.upload-suggestion-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.upload-suggestion-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 错误消息 */
.error-message {
    background: rgba(248, 215, 218, 0.95);
    color: #721c24;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

/* 页脚 */
.site-footer {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    margin-top: 80px;
    backdrop-filter: blur(10px);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 50px 0 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-stats {
        gap: 40px;
    }
    
    .stat-number {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .hero-title {
        font-size: 2.5em;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2em;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .game-card {
        margin: 0 10px;
    }
    
    .game-info {
        padding: 20px;
    }
    
    .game-actions {
        padding: 0 20px 20px;
    }
    
    .no-games {
        padding: 60px 30px;
    }
}

/* 播放器页面样式 */
.player-content {
    padding: 20px 0;
    min-height: calc(100vh - 200px);
}

.back-link {
    margin-bottom: 20px;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.back-link a:hover {
    color: #5a6fd8;
}

.player-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.flash-player {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.player-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.player-controls {
    display: flex;
    gap: 10px;
}

.ruffle-container {
    width: 100%;
    height: 600px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ruffle-player {
    width: 100%;
    height: 100%;
    border: none;
}

.game-info-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    height: fit-content;
}

.game-info-sidebar h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-details {
    margin-bottom: 25px;
}

.detail-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.detail-value {
    display: block;
    color: #333;
    line-height: 1.4;
}

.game-actions {
    margin-bottom: 25px;
}

.action-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn.favorited {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.game-tips {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.game-tips h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-tips ul {
    margin: 0;
    padding-left: 20px;
}

.game-tips li {
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .player-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ruffle-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .player-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .ruffle-container {
        height: 400px;
    }
    
    .flash-player {
        padding: 15px;
    }
    
    .game-info-sidebar {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .ruffle-container {
        height: 300px;
    }
    
    .player-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .control-btn {
        width: 100%;
    }
}

/* 全局颜色变量 */
:root {
    --primary: #2196F3;
    --primary-light: #64B5F6;
    --primary-dark: #1976D2;
    --secondary: #00BCD4;
    --accent: #4CAF50;
    --highlight: #FF9800;
    --text-primary: #212121;
    --text-secondary: #757575;
    --background: #FFFFFF;
    --background-alt: #F5F5F5;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-alt);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background: var(--background);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.nav-brand {
    color: var(--primary);
}

.nav-link:hover {
    color: var(--primary);
}

.admin-link {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
}

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    padding: 60px 0;
}

/* 搜索区域 */
.search-bar input:focus {
    border-color: var(--primary);
}

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

/* 资源卡片 */
.game-card {
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-thumbnail {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
}

.game-badge {
    background: var(--background);
    color: var(--primary);
}

.play-btn {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
}

/* 页脚 */
.site-footer {
    background: var(--text-primary);
}

.footer-section h4 {
    color: var(--primary-light);
}