/* 游戏页面样式 */

.games-slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.games-slider {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
    gap: 20px;
}

.game-card {
    flex: 0 0 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.game-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.1);
}

/* 游戏卡片遮罩层 */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(0, 0, 0, 0.6) 50%, 
        rgba(0, 0, 0, 0.9) 100%);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.game-card:hover .game-overlay {
    transform: translateY(0);
}

.game-overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease 0.1s, opacity 0.3s ease 0.1s;
}

.game-card:hover .game-overlay-content {
    transform: translateY(0);
    opacity: 1;
}

.game-overlay h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 600;
}

.game-category {
    color: #64ffda;
    font-weight: 500;
    margin-bottom: 5px;
}

.game-difficulty {
    color: #ffb74d;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.game-controls {
    color: #e0e0e0;
    font-size: 0.85em;
    margin-bottom: 15px;
    line-height: 1.4;
}

.game-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-play {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-play:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-info {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-info:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 游戏信息区域 */
.game-info {
    padding: 20px;
}

.game-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-primary);
}

.game-description {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
}

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

.game-tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-tag.difficulty-简单 {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
}

.game-tag.difficulty-中等 {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

.game-tag.difficulty-困难 {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border-color: rgba(244, 67, 54, 0.3);
}

/* 难度标签样式 - 中英文支持 */
.game-tag.difficulty-简单,
.game-tag.difficulty-easy {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
}

.game-tag.difficulty-中等,
.game-tag.difficulty-medium {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

.game-tag.difficulty-困难,
.game-tag.difficulty-hard {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border-color: rgba(244, 67, 54, 0.3);
}

/* 滑动导航按钮 */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 10px;
}

.slider-nav.next {
    right: 10px;
}

.slider-nav span {
    font-size: 20px;
    color: white;
    font-weight: bold;
}

.slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-nav:disabled:hover {
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
}

/* 滑动指示器 */
.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

/* 无游戏状态 */
.no-games {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-games-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-games h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* 游戏详情模态框 */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.game-modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 100px);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 游戏详情页样式 */

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

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.back-icon {
    font-size: 18px;
}

.game-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-thumbnail-large {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-thumbnail-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-header-info h1 {
    margin: 0 0 15px 0;
    font-size: 2em;
    color: var(--text-primary);
    font-weight: 700;
}

.game-description {
    color: var(--text-secondary);
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.game-meta-large {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 60px;
}

.meta-value {
    color: var(--text-primary);
    font-weight: 500;
}

.meta-value.difficulty-简单,
.meta-value.difficulty-easy {
    color: #4caf50;
}

.meta-value.difficulty-中等,
.meta-value.difficulty-medium {
    color: #ffc107;
}

.meta-value.difficulty-困难,
.meta-value.difficulty-hard {
    color: #f44336;
}

.game-actions-large {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-play-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-play-large:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-fullscreen {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

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

/* 游戏画布区域 */
.game-container {
    position: relative;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.game-canvas-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

#gameCanvas {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    background: #000;
}

.game-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.game-loading p {
    font-size: 1.1em;
    margin: 0;
}

.error-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.btn-retry {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.btn-retry:hover {
    background: #5a6fd8;
}

.game-controls-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.control-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* 游戏详细信息 */
.game-details {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-content {
    color: var(--text-primary);
    line-height: 1.7;
}

.game-content h1,
.game-content h2,
.game-content h3 {
    color: var(--text-primary);
    margin-top: 30px;
    margin-bottom: 15px;
}

.game-content h1 {
    font-size: 2em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.game-content h2 {
    font-size: 1.5em;
    color: #64ffda;
}

.game-content h3 {
    font-size: 1.2em;
    color: #ffb74d;
}

.game-content p {
    margin-bottom: 15px;
}

.game-content ul,
.game-content ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.game-content li {
    margin-bottom: 8px;
}

.game-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.game-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .games-slider-container {
        padding: 15px;
    }
    
    .game-card {
        flex: 0 0 250px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
    }
    
    .slider-nav span {
        font-size: 16px;
    }
    
    .game-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
        max-height: calc(90vh - 80px);
    }
    
    .game-header {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .game-thumbnail-large {
        height: 150px;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .game-header-info h1 {
        font-size: 1.5em;
        text-align: center;
    }
    
    .game-actions-large {
        justify-content: center;
    }
    
    .game-container {
        padding: 15px;
    }
    
    .game-canvas-wrapper {
        min-height: 300px;
    }
    
    .game-details {
        padding: 20px;
    }
    
    .game-content h1 {
        font-size: 1.5em;
    }
    
    .game-content h2 {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .game-card {
        flex: 0 0 200px;
    }
    
    .game-thumbnail {
        height: 150px;
    }
    
    .game-overlay-content {
        padding: 15px;
    }
    
    .game-overlay h3 {
        font-size: 1.1em;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .game-header {
        padding: 10px;
    }
    
    .game-header-info h1 {
        font-size: 1.3em;
    }
    
    .btn-play-large,
    .btn-fullscreen {
        padding: 10px 16px;
        font-size: 0.9em;
    }
    
    .game-container {
        padding: 10px;
    }
    
    .game-details {
        padding: 15px;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}
