.game-list-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(15px, 4vw, 30px);
    box-sizing: border-box;
}

.game-list-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.game-list-modal {
    position: relative;
    width: min(90%, 500px);
    max-width: 100%;
    max-height: min(90vh, 700px);
    background-color: white;
    border-radius: clamp(15px, 4vw, 20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.game-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(15px, 4vw, 20px) clamp(18px, 4.5vw, 25px);
    background: linear-gradient(135deg, #4096ff 0%, #1e88e5 100%);
    color: white;
    flex-shrink: 0;
}

.game-list-title {
    margin: 0;
    font-size: clamp(18px, 4.5vw, 24px);
    font-weight: 600;
    word-wrap: break-word;
}

.game-list-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: clamp(24px, 6vw, 30px);
    cursor: pointer;
    padding: 0;
    width: clamp(30px, 8vw, 40px);
    height: clamp(30px, 8vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

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

.game-list-content {
    padding: clamp(15px, 4vw, 20px);
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.game-item {
    display: flex;
    align-items: center;
    padding: clamp(12px, 3vw, 15px);
    margin-bottom: clamp(10px, 2.5vw, 15px);
    background-color: #f8f9fa;
    border-radius: clamp(10px, 2.5vw, 12px);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    width: 100%;
    box-sizing: border-box;
}

.game-item:hover {
    background-color: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #4096ff;
}

.game-item-icon {
    font-size: clamp(32px, 8vw, 40px);
    margin-right: clamp(10px, 2.5vw, 15px);
    width: clamp(50px, 12vw, 60px);
    text-align: center;
    flex-shrink: 0;
}

.game-item-info {
    flex: 1;
    min-width: 0;
}

.game-item-name {
    font-size: clamp(15px, 3.5vw, 18px);
    font-weight: 600;
    color: #333;
    margin-bottom: clamp(3px, 1vw, 5px);
    word-wrap: break-word;
}

.game-item-desc {
    font-size: clamp(12px, 2.8vw, 14px);
    color: #666;
    word-wrap: break-word;
}

.game-item-play {
    background: linear-gradient(135deg, #4096ff 0%, #1e88e5 100%);
    color: white;
    padding: clamp(6px, 1.8vw, 8px) clamp(12px, 3vw, 16px);
    border-radius: clamp(6px, 1.8vw, 8px);
    font-size: clamp(12px, 2.8vw, 14px);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.game-item:hover .game-item-play {
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .game-list-modal {
        width: min(95%, 500px);
        margin: 0;
    }
    
    .game-list-header {
        padding: clamp(12px, 3.5vw, 15px) clamp(15px, 4vw, 20px);
    }
    
    .game-list-title {
        font-size: clamp(16px, 4vw, 20px);
    }
    
    .game-item {
        padding: clamp(10px, 2.8vw, 12px);
        margin-bottom: clamp(8px, 2.2vw, 12px);
    }
    
    .game-item-icon {
        font-size: clamp(28px, 7vw, 30px);
        width: clamp(45px, 11vw, 50px);
        margin-right: clamp(8px, 2.2vw, 12px);
    }
    
    .game-item-name {
        font-size: clamp(14px, 3.2vw, 16px);
    }
    
    .game-item-desc {
        font-size: clamp(11px, 2.5vw, 13px);
    }
    
    .game-item-play {
        padding: clamp(5px, 1.5vw, 6px) clamp(10px, 2.8vw, 12px);
        font-size: clamp(11px, 2.5vw, 13px);
    }
}

@media (max-width: 480px) {
    .game-list-container {
        padding: 0;
    }
    
    .game-list-modal {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    .game-list-header {
        padding: clamp(15px, 5vw, 20px);
    }
    
    .game-list-content {
        padding: clamp(12px, 4vw, 15px);
    }
    
    .game-item {
        flex-direction: column;
        text-align: center;
        padding: clamp(15px, 5vw, 20px);
    }
    
    .game-item-icon {
        margin-right: 0;
        margin-bottom: clamp(8px, 2.5vw, 10px);
    }
    
    .game-item-info {
        margin-bottom: clamp(10px, 2.8vw, 12px);
    }
    
    .game-item-play {
        width: 100%;
        padding: clamp(10px, 3vw, 12px);
        font-size: clamp(13px, 3vw, 15px);
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .game-list-modal {
        max-height: 95vh;
    }
    
    .game-list-header {
        padding: clamp(10px, 3vh, 15px) clamp(15px, 4vw, 20px);
    }
    
    .game-item {
        padding: clamp(8px, 2.5vh, 12px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-list-modal,
    .game-list-overlay,
    .game-item,
    .game-item-play,
    .game-list-close-btn {
        transition: none !important;
        animation: none !important;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-list-content::-webkit-scrollbar {
    width: clamp(6px, 2vw, 8px);
}

.game-list-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.game-list-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.game-list-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
