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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.header {
    background: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    text-decoration: none;
}

.main-container {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 80px);
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

.sidebar {
    width: 250px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
    z-index: 100;
    flex-shrink: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 4px;
    text-decoration: none;
    color: inherit;
}

.sidebar-item:hover {
    background: #f8f9fa;
}

.sidebar-item.active {
    background: #e3f2fd;
    color: #1976d2;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.featured-game {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.game-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 高宽比 */
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: unset;
    height: unset;
}

.game-iframe,
.game-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.game-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    text-align: center;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.game-info-panel {
    display: flex;
    align-items: center;
    gap: 20px;
}

.game-title {
    font-size: 24px;
    font-weight: bold;
}

.game-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    opacity: 0.8;
}

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

.action-button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.action-button:hover {
    background: rgba(255,255,255,0.3);
}

.play-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.play-button:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.featured-content {
    display: none;
}

.featured-text {
    flex: 1;
}

.featured-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 16px;
}

.featured-subtitle {
    font-size: 18px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.featured-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    opacity: 0.8;
}

.featured-icon {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.content-description {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.description-section {
    margin-bottom: 30px;
}

.description-section:last-child {
    margin-bottom: 0;
}

.description-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 8px;
}

.description-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
}

.description-text {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.game-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card:hover {
    transform: translateY(-4px);
}

.game-thumbnail {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-info {
    padding: 12px;
}

.game-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



.right-sidebar {
    width: 364px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

.popular-games {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.popular-games h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

/* 左侧More Games模块样式 */
.left-popular-games {
    margin-top: 20px;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.popular-item {
    width: 100%;
    border-radius: 8px;
    background: white;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.popular-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.popular-item-image {
    width: 100%;
    height: 80px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popular-item-title {
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.advertisement {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ad-banner {
    width: 100%;
    height: 100px;
    background: linear-gradient(45deg, #2196f3, #21cbf3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-container {
        gap: 15px;
        padding: 15px;
    }
    
    .sidebar {
        width: 220px;
    }
    
    .right-sidebar {
        width: 312px;
    }
}

@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .sidebar, .right-sidebar {
        width: 100%;
        position: static;
    }
    
    .featured-game {
        min-height: 500px;
    }
    
    .game-container {
        min-height: 400px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .game-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .featured-game {
        min-height: 450px;
        padding: 15px;
    }
    
    .game-container {
        min-height: 350px;
    }
    
    .game-title {
        font-size: 20px;
    }
    
    .game-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .popular-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
